Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- first_center_x = int(input("Enter the x axis coordinate of the first circle center: "))
- first_center_y = int(input("Enter the y axis coordinate of the first circle center: "))
- second_center_x = int(input("Enter the x axis coordinate of the second circle center: "))
- second_center_y = int(input("Enter the y axis coordinate of the second circle center: "))
- radius_one = int(input("Enter the radius of the first circle: "))
- radius_two = int(input("Enter the radius of the second circle: "))
- centers = math.sqrt((first_center_x + second_center_x) ** 2 + (first_center_y + second_center_y) ** 2)
- radius = radius_one + radius_two
- if radius > centers:
- print("The circles overlap.")
- else:
- print("The circles don't overlap.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement