Why is it crashing? (newbie)
Douglas Zongker
dougz at cs.washington.edu
Sun Jul 7 11:12:36 EDT 2002
Charles Mantha <charles_mantha at hotmail.com> wrote:
: I am trying to run a small toy program which I modified from a tutorial.
:
: [...]
: menu_choice = int(raw_input("Choose one of the options: ")),
: while menu_choice != 3:
: if menu_choice == 1:
: run_test(get_questions())
Remove the comma from the end of the line that sets menu_choice. With
the comma, when the user types "1", menu_choice gets the tuple "(1,)"
instead of the int "1". This is making your while loop run forever
without doing anything.
dz
More information about the Python-list
mailing list