Advertisement
Guest User

Untitled

a guest
May 28th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. # Area calculation program
  2.  
  3. print ("Welcome to the Area calculation program")
  4. print ("---------------------------------------")
  5. print
  6.  
  7.  
  8. print ("Please select a shape:")
  9. print ("1 Rectangle")
  10. print ("2 Circle")
  11.  
  12. = shape
  13.  
  14.  
  15. if shape == 1:
  16. height = input("Please enter the height: ")
  17. width = input("Please enter the width: ")
  18. area = height*width
  19. print ("The area is", area)
  20. else:
  21. radius = input("Please enter the radius: ")
  22. area = 3.14*(radius**2)
  23. print ("The area is", area)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement