Guest User

Untitled

a guest
Jan 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. #Tim Howard
  2. #Pool Program
  3.  
  4.  
  5. calc=input ("Do you want to calculate the area or circumference of a pool? Y or N ")
  6. while (calc == "y"):
  7.     if calc == "y":
  8.         rad=int(input("Enter the radius of the pool "))
  9.         cora=input("Do you want to know the circumference or area? C or A ")
  10.         if cora == "c":
  11.                 res=(2*3.14)*rad
  12.                 print("The circumference of a circle with radius", rad,"is", res)
  13.                
  14.         elif cora == "a":
  15.                 res=3.14*(rad*rad)
  16.                 print ("The area of a circle with radius", rad, "is",res)
  17.         else:
  18.             ("Invalid Selection.  Please try again.")
  19.            
  20.            
  21.  
  22.  
  23.  
  24.  
  25.  
  26. input("Press enter to exit")
Add Comment
Please, Sign In to add comment