[Tutor] (no subject)

adam urbas adamurbas at hotmail.com
Sat May 12 05:16:17 CEST 2007


Hi,I just started python today and I would like a few pointers, if you don't mind.  I tried using a tutorial, but was only able to get the correct results for the most basic problems.  # Area calculation programprint “Welcome to the Area calculation program”print “–––––––––––––”print# Print out the menu:print “Please select a shape:”print “1  Rectangle”print “2  Circle”# Get the user’s choice:shape = input(“> “)# Calculate the area:if shape == 1:    height = input(“Please enter the height: “)    width = input(“Please enter the width: “)    area = height*width    print “The area is”, areaelse:    radius = input(“Please enter the radius: “)    area = 3.14*(radius**2)    print “The area is”, areaI've been trying to get this to work.  I was on a forum on Google and they said to put:input("press ENTER to continue")at the end.  I did, but it didn't work.  It runs the program but just shuts itself off when its done and i don't even get to select any of the option things that i'm supposed to be able to select.  It just turns on then back off and I don't even get to see anything.  Could someone help me out.ThanksAdam
_________________________________________________________________
Create the ultimate e-mail address book. Import your contacts to Windows Live Hotmail.
www.windowslive-hotmail.com/learnmore/managemail2.html?locale=en-us&ocid=TXT_TAGLM_HMWL_reten_impcont_0507
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070511/1ece763a/attachment.html 


More information about the Tutor mailing list