Advertisement
Guest User

Circle Tool

a guest
May 28th, 2016
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. import math
  2. import time
  3. Circum = int("1")
  4. arree = int("2")
  5. print("Welcome To Circle Tool")
  6. pie = float(3.14159265358979323)
  7. circ_or_ar = input("Do you want to figure out the circumference(1) or the area(2) of the circle?")
  8. if circ_or_ar == Circum:
  9.   Circ_Gen(pie)
  10. elif circ_or_ar == arree:
  11.   Area_Gen(pie)
  12. else:
  13.   print("I AM ERROR")
  14. def Area_Gen(pie)
  15.   Rad = float(input("What is the radius?"))
  16.   Area = pie * (Rad * Rad)
  17.   print(Area)
  18.   return;
  19. def Circ_Gen(pie):
  20.   Diam = float(input("What is the diameter? "))
  21.   Circumference = Diam * pie
  22.   print(Circumference)
  23.   return;
  24. time.sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement