Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. import math
  2.  
  3.  
  4. def task3():
  5. side1 = float(input("Length of Side 1:"))
  6. side2 = float(input("Length of Side 2:"))
  7.  
  8. radius = task3getRadius(side1, side2)
  9. print("Radius of resulting Circle: {:.2f}".format(radius))
  10. print("Diameter of resulting Circle: {:.2f}".format(radius * 2))
  11. circumference = task3getCircumference(radius)
  12. print("Circumference of the resulting Circle {:.2f}".format(circumference))
  13. area = task3getArea(radius)
  14. print("Area of resulting Circle: {:.2f}".format(area))
  15.  
  16.  
  17. def task3getRadius(x, y):
  18. z = math.sqrt((x ** 2) + (y ** 2)) / 2
  19. return z
  20.  
  21.  
  22. def task3getCircumference(x):
  23. y = 2 * math.pi * x
  24. return y
  25.  
  26.  
  27. def task3getArea(x):
  28. y = math.pi * x ** 2
  29. return y
  30.  
  31.  
  32. task3()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement