building a small calculator
Simon Brunning
simon.brunning at gmail.com
Wed Apr 20 08:25:07 EDT 2005
On 20 Apr 2005 05:18:17 -0700, aleksander.helgaker at gmail.com
<aleksander.helgaker at gmail.com> wrote:
> Now once the user has select a shape and typed in the lengths required,
> the result is printed and the program quits. What I want to do is make
> the program display the result and then make it wait for the user to
> press return (or something like that) after which the screen will be
> cleared and they'll be back at the main menu.
raw_input('Hit Enter to continue...')
> Also I would like to add option nr 4 to the menu and make that the quit
> command, but what command does python have to stop a program? I tried
> end but that did not work.
sys.exit()
Welcome to Python!
--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/
More information about the Python-list
mailing list