This code is not working for me, and I keep getting an unsupported operand type error. The error code reads TypeError: unsupported operand type(s) for Sub: 'str' and 'str' on line 10
x1 = input(print("What is the x coordinate of the first circle: "))
y1 = input(print("What is the y coordinate of the first circle: "))
r1 = input(print("What is the radius of the first circle: " ))
x2 = input(print("What is the x coordinate of the second circle: "))
y2 = input(print("What is the y coordinate of the second circle: "))
r2 = input(print("What is the radius of the second circle: "))
import math
def distance(x1, y1, x2, y2):
return math.sqrt(math.pow(x2 - x1, 2) +
math.pow(y2 - y1, 2) * 1.0)
print("%.6f"%distance(x1, y1, x2, y2))
if distance <= abs(r1 - r2):
print("Circle 2 is inside of circle 1")
elif distance <= r1 + r2:
print("Circle 2 overlaps circle 1")
else:
print("Circle 2 does not overlap circle 1")