Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getRadius():
- print ("Please input the radius of a circle")
- radius = input()
- return radius
- def calculateCircumference():
- pi = 3.14
- diameter = radius*2
- circumference = float(diameter) * pi
- print ("The circumference is",str(circumference))
- return circumference, diameter, pi
- def calculateArea():
- area = diameter*pi
- return area
- def displayResults():
- print("The circle has a radius of",radius)
- print("The circle has a diameter of",diameter)
- print("The circle has a circumference of",cirucmference)
- print("The circle has a area of",area)
- #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