perhaps it is better if you use
int(raw_input:)
than
int(input:)
input already returns the integer value, there's no need for an int in front of the input, but if you want to use raw_input, and still use the value as an integer, you must use int(raw_input).
From the latest versions of python, 2.5->, input was depreciated and it is better to use raw_input, and for values not strings, int(raw_input).
But still, input is a good way of getting the value, but if a string is enter in the input function, there will be raised an error.
File "<string>", line 1, in <module>
NameError: name 's' is not defined
lucaciandrew
Junior Poster in Training
73 posts since Jan 2012
Reputation Points: 10
Solved Threads: 5