TechnologicalGenious
TechnologicalGenious

Reputation: 37

Python raw_input is not working

Below is my code:

randomOne = int(str(raw_input('Enter the first number.')))
randomTwo = int(str(raw_input('Enter the second number.')))

I always get this error message:

Traceback (most recent call last):
    File "C:/Users/*****/Desktop/Pythons/randomNumberGenerator.py", line 5, in <module>
randomOne = int(str(raw_input('Enter the first number.')))
NameError: name 'raw_input' is not defined

I do not understand at all what is going on, if i could have some help?

Upvotes: 2

Views: 6101

Answers (1)

thefourtheye
thefourtheye

Reputation: 239433

If you are using python 3, it doesn't have raw_input, use input instead.

Upvotes: 7

Related Questions