0:00
Hello.
00:01
For problem 29, you're asked to write a program that takes the center coordinates and radii of two circles and then determines whether the second circle is inside the first or overlaps with the first.
00:15
And it gives us a hint that circle two is inside of circle one if the distance between their centers is less than or equal to the absolute value of r1 minus r2 and circle two overlaps if the distance between the two centers is less than are equal to r1 plus r2.
00:43
So we're going to need to use the math library here.
00:47
So i'll start by importing math.
00:49
Then we want to get the input from the user.
00:52
So x, 1, y one, and r1 will be the center x and y coordinates and radius for circle 1.
00:59
X2, y2, and r2 will be the same for circle 2 and then we want to figure out to the distance between their centers.
01:09
So we'll just use the distance formula here and d will be equal to math...