Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Understanding Group Affiliations?

Answered: 1 week ago

Question

b. Will there be one assigned leader?

Answered: 1 week ago

Question

Do you currently have a team agreement?

Answered: 1 week ago