[Tutor] Re: Looks like Giant Calc is a bust.
DogWalker
forestiero at qwest.net
Sun Jul 10 06:26:56 CEST 2005
"Nathan Pinno" <falcon3166 at hotmail.com> said:
>Hey all,
>
>The Giant Calculator runs now, just not as I want it to. I can't seem to get it past the main menu. Here is the code:
>
># This program is designed as a big calculator with functions.
>
># This first bunch of code is for the various menus. I decided to divide the calculations into seperate sub-menus,
>#so that the main menus would not be that long.
>option = 0
>a = 0
>b = 0
>temp_option = 0
>formula_option = 0
>
>def main_menu():
global option # Without this, 'option' is local! <<<-----
> 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:" )
>
... and so on in all the other functions.
[...]
More information about the Tutor
mailing list