[Tutor] Simple question

Oscar Chavez oc918@mizzou.edu
Sun, 10 Oct 1999 11:52:29 -0500


I wrote this simple program:

---- F2C.py:

# Temperature conversion

print "This little program converts from Farenheit to Celsius,"
print "or from Celsius to Farenheit"
print "-----------------------------------------------"

# Print the menu
print "What do you want to convert?"
print "1 From Farenheit to Celsius"
print "2 From Celsius to Farenheit"

# Get the user's choice:
formula = input("-->")
print

# Calculate the result:
if formula == 1:
	F = input("What is the temperature in °F?")
	C = (F - 32)*5/9
	print
	print F,"°F is equivalent to", C, "°C"
else:
	C = input("What is the temperature in °C?")
	F = C*9/5 + 32
	print
	print C, "°C is equivalent to", F, "°F"

-----

And it works fine, except for the way it has to be run. The only way I can
make it run as a command line program is when I save it as an applet. I
like the way it looks, at this moment I don't want to be concerned about
GUI. The problem is that as soon as it gives the answer, it quits by
itself, not allowing the user to see the result. How can I make it to wait
for, let's say a return, to quit?
__________________________________________________________________________
Oscar Chavez                                       104 Stewart Hall
oc918@mizzou.edu                                   University of Missouri
(573) 882-4521                                     Columbia, MO 65211-6180