[Tutor] Fwd: Python skipping if statement (Really simple code)
Peter Otten
__peter__ at web.de
Fri Apr 15 09:55:49 CEST 2011
Casey Key wrote:
> ---------- Forwarded message ----------
> From: Casey Key <i.eat.brainzzz at gmail.com>
> Date: Thu, Apr 14, 2011 at 4:02 PM
> Subject: Python skipping if statement (Really simple code)
> To: tutor at python.com
>
>
> Hey im a newbie to python, but i made this test code. and it is just
> skipping over the if statement, which is essential to the program.
When you run your code, enter yes to the first question Python stops
with a "traceback", a dump of the error that has occured:
$ python3 ascii_art.py
Renees a hater, and you know what happens to hater? They hate!
They purpose of this program is to express your feelings toward Renee.
Note:I am not pointing of a particular Renee it is just a random name.
After reading the note do you want to proceed? yes
Lets get started.
Renees hate level is at 3
Traceback (most recent call last):
File "ascii_art.py", line 12, in <module>
proceed = input(int("Do you want to see Renees hate in form of a picture? "))
ValueError: invalid literal for int() with base 10: 'Do you want to see Renees hate in form of a picture? '
Read the last line carefully, then go upwards where the traceback
tells you in what line the error occured and see if you can fix
the problem yourself. Come back here if you can't.
More information about the Tutor
mailing list