Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def task3():
- side1 = float(input("Length of Side 1:"))
- side2 = float(input("Length of Side 2:"))
- radius = task3getRadius(side1, side2)
- print("Radius of resulting Circle: {:.2f}".format(radius))
- print("Diameter of resulting Circle: {:.2f}".format(radius * 2))
- circumference = task3getCircumference(radius)
- print("Circumference of the resulting Circle {:.2f}".format(circumference))
- area = task3getArea(radius)
- print("Area of resulting Circle: {:.2f}".format(area))
- def task3getRadius(x, y):
- z = math.sqrt((x ** 2) + (y ** 2)) / 2
- return z
- def task3getCircumference(x):
- y = 2 * math.pi * x
- return y
- def task3getArea(x):
- y = math.pi * x ** 2
- return y
- task3()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement