Python 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Python 3

What makes this code wrong?? We learned about the random module today. Way wont it work ? https://code.sololearn.com/cfpuyeBGdfV0/?ref=app

11th Mar 2020, 7:46 PM
JOXs ๐Ÿ
JOXs ๐Ÿ - avatar
3 Answers
+ 2
I think you are missing an- import random Also write print(s) at end to see the result.
11th Mar 2020, 7:49 PM
Avinesh
Avinesh - avatar
+ 2
Import random and print result. import random x = random.randint(1,50) y = random.randint(2,5) s = x**y print(x, "power", y, "=", s)
11th Mar 2020, 7:50 PM
Jayakrishna ๐Ÿ‡ฎ๐Ÿ‡ณ
+ 1
thank you guys ๐Ÿ˜‚๐Ÿ’œ๐Ÿ’œ
11th Mar 2020, 7:51 PM
JOXs ๐Ÿ
JOXs ๐Ÿ - avatar