Question
Use Python for coding Use Python for coding Task 1. Create a class Circle with attributes r (radius), and C (center from class Point from
Use Python for coding
Use Python for coding
Task 1. Create a class Circle with attributes r (radius), and C (center from class Point from lecture 9).
Task 2. Write a function printCircle(circle1) which prints:
Circle of radius r with the center (x, y)
Task 3. Implement a boolean function Intersect (circle1, circle2) which returns True if two circles intersect, otherwise False.
Task 4. Add 2 methods to class Circle:
enlargeCircle(self, r) - increases the radius by r (creates and returns new object); shiftCircle(self, x, y) - shifts the center of circle by x and y (updates the old one).
Task 5. Add methods Area() and Perimeter() which returns the area and perimeter of the circle respectively.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started