Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- class Circle():
- def inside(self, x1, y1, x2, y2, radius):
- self.x1 = x1
- self.y1 = y1
- self.x2 = x2
- self.y2 = y2
- self.radius = radius
- self.length = math.sqrt((self.x2 - self.x1) ** 2 + (self.y2 - self.y1) ** 2)
- if self.length < self.radius:
- return True
- else:
- return False
- circle1 = Circle()
- x1 = int(input("Введите x центра"))
- y1 = int(input("Введите y центра"))
- radius = int(input("Введите радиус"))
- for i in range(1,4):
- x2 = int(input("Введите x точки " + str(i)))
- y2 = int(input("Введите y точки " + str(i)))
- print(circle1.inside(x1, y1, x2, y2, radius))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement