Question: efine the Circle Class ( 2 marks ) Define a class named Circle. The class should have one private attribute: radius ( default to 1

efine the Circle Class (2 marks) Define a class named Circle. The class should have one private attribute: radius (default to 1.0). Include the following methods:init (self, radius: float)- Constructor to initialize the ra- dius.get radius(self)-> float - Returns the radius.set radius(self, radius: float)- Sets a new radius (shouldvalidate that the radius is positive).calculate area(self)-> float - Returns the area of the circle(\times radius2).calculate circumference(self)-> float - Returns the circum-ference of the circle (2\times \times radius).

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 Programming Questions!