0

5.5kviews

Write a Python class named Circle constructed by a radius and two methods which will compute the area and the perimeter of a circle.

**1 Answer**

0

5.5kviews

Write a Python class named Circle constructed by a radius and two methods which will compute the area and the perimeter of a circle.

0

1.7kviews

written 16 months ago by |

**Code:-**

```
class Circle():
def radius(self,radius):
r = radius
def area(self,r):
area = 3.142*r*r
print("Area of the circle is: ",area)
def peri(self,r):
peri = 2*3.14*r
print("Perimeter of the circle is: ",peri)
c = Circle()
radius = int(input("Enter the radius of circle: "))
c.area(radius)
c.peri(radius)
```

**Output:-**

ADD COMMENT
EDIT

Please log in to add an answer.