-1

My code worked, I changed nothing, and now its highlighted saying it cant reference the module properly

ive tried retyping everything, looking up tutorials, trying SUPER simple lines of code, and my random module in pycharm python 3 is not working

import random

value = random.random()
print(value)

basically, value = random.random() after the dot is highlighted and is saying cannot find reference 'random' in random, like... what??

Iain Shelvington
  • 31,030
  • 3
  • 31
  • 50

1 Answers1

-3

If there is a space after the dot(random. random() ) remove it.

random.random() 

Try it

taras
  • 6,566
  • 10
  • 39
  • 50
Adama Ko
  • 1
  • 1