are modules in python enabled | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

are modules in python enabled

im trying to add the random number generator module using import random As I do on my Linux computer and then use print random.random(0, 300) And I get a syntax error

9th Mar 2017, 2:10 AM
Matthew Grossman
Matthew Grossman - avatar
2 Answers
0
it is rand function not random. check rand function then implement it.
9th Mar 2017, 2:54 AM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar
0
yes, upper gives u the right answer. randint(a,b)
22nd Mar 2017, 5:01 AM
Jingxiong Luang
Jingxiong Luang - avatar