0
Import random doesn't works on Pycharm environment
I ve written these lines of python on Pycharm environment I ve none error but no output could you me where is my fault import random for i in range(5): value = random.randint(1, 6) print(value)
1 Respuesta
+ 5
In which line the error is? (A) In the line the module is imported or (B) in the line the method is used?
(A): execute this line:
help("modules")
You'll get the list of all the
Can you find any module that you could suspect to perform randomizing?
(B): execute these 2 lines:
import random
print(dir(random))
You'll get a list of all the available names from random module.
Can you find name "randint"?