x=int(raw_input("Enter first number"))
y=int(raw_input("Enter second number"))
I do not understand why I am unable to post this into my Python 3.8.2 shell? Does anyone have any advice on an alternative way?
Thanks.
x=int(raw_input("Enter first number"))
y=int(raw_input("Enter second number"))
I do not understand why I am unable to post this into my Python 3.8.2 shell? Does anyone have any advice on an alternative way?
Thanks.
raw_input
is python2 syntax and you should use.input
.
it was renamed in python 3, refer to the following link: http://docs.python.org/dev/py3k/whatsnew/3.0.html
change to:
x=int(input("Enter first number"))
y=int(input("Enter second number"))
Regarding the issue of pasting both in the terminal, you should read about the input
function and you'll see that once it's called it waits for an input and is something was pasted it will take it as an input.