Advertisement
endzie_fyrge

[28] Rectangle's Circumscribed Circle

Aug 8th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import math
  2.  
  3. print("Enter the side lengths of the rectangle.")
  4. a = float(input("a = "))
  5. b = float(input("b = "))
  6. radius = float(input("Enter the radius of the circle: "))
  7.  
  8. diagonal = math.sqrt(a ** 2 + b ** 2) / 2
  9.  
  10. if diagonal == radius:
  11.     print("The circle can be circumscribed around the rectangle.")
  12. else:
  13.     print("The circle cannot be circumscribed around the rectangle.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement