[Tutor] What's going on with this code? Error message supplied.
Nathan Pinno
falcon3166 at hotmail.com
Sun Jul 10 05:07:36 CEST 2005
Here is the error message:
Traceback (most recent call last):
File "D:\GC.py", line 67, in ?
if option == 1:
NameError: name 'option' is not defined
And the relevant code:
print "The Giant Calculator"
print
print "Copyright 2005 Written and debugged by Nathan Pinno"
print
print main_menu()
if option == 1:
and the dictionary code:
def main_menu():
print "OPTIONS MENU"
print "1) Calculate"
print "2) Shapes"
print "3) Temperature"
print "4) Formulas"
print "5) Quit"
option = input("What option would you like:" )
Thanks ahead of time,
Nathan Pinno
http://www.npinnowebsite.ca/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050709/7eb2e904/attachment.htm
More information about the Tutor
mailing list