I'm trying to make it so it only allows numbers, not strings.
number = (input("Pick a number "))
I have tried using (raw_input(""))
, but this error comes up:
"line 1, in number = (raw_input("Pick a number ")) NameError: name 'raw_input' is not defined"
I also tried int(raw_input(""))
, and the same error came up.
I also tried int(input(""))
, but an error came up aswell:
TypeError: unsupported operand type(s) for +: 'int' and 'str'