Question: PYTHON *PLEASE ANSWER QUICKLY* Define a class named circle that has a radius as its instance attribute. define a constructor for the class circle that

PYTHON *PLEASE ANSWER QUICKLY*

Define a class named circle that has a radius as its instance attribute.

define a constructor for the class circle that takes a radius value as its parameter with a default value equals to 1.

define a class method named setRadius that takes a radius value as its parameter and sets the class instance attribute, radius, to the method parameter, radius.

define a class method named getRadius that takes no parameter and returns the class instance attribute, radius.

define a class method name getArea that takes no parameter and returns the area of a circle. The area of a circle is pi * r2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!