Advertisement
14douglash

Doot

Oct 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. def getRadius():
  2. print ("Please input the radius of a circle")
  3. radius = input()
  4. return radius
  5. def calculateCircumference():
  6. pi = 3.14
  7. diameter = radius*2
  8. circumference = float(diameter) * pi
  9. print ("The circumference is",str(circumference))
  10. return circumference, diameter, pi
  11. def calculateArea():
  12. area = diameter*pi
  13. return area
  14. def displayResults():
  15. print("The circle has a radius of",radius)
  16. print("The circle has a diameter of",diameter)
  17. print("The circle has a circumference of",cirucmference)
  18. print("The circle has a area of",area)
  19. #need to work on return statements, don't understand how to use them with different functions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement