Import random doesn't works on Pycharm environment | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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)

11th May 2019, 4:54 PM
Arnaud Hubert
Arnaud Hubert - avatar
1 ответ
+ 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"?
11th May 2019, 6:07 PM
Seb TheS
Seb TheS - avatar