Message95871
# Area calculation program
print "Show Area"
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", area
else:
radius = input ("Please enter the radius: ")
area = 3.14* (radius**2)
print "The area is", area |
|
Date |
User |
Action |
Args |
2009-12-01 20:38:20 | Fallen | set | recipients:
+ Fallen |
2009-12-01 20:38:20 | Fallen | set | messageid: <1259699900.65.0.917773052949.issue7421@psf.upfronthosting.co.za> |
2009-12-01 20:38:19 | Fallen | link | issue7421 messages |
2009-12-01 20:38:18 | Fallen | create | |
|