Advertisement
Mizuhara_Chizuru

Untitled

Jun 20th, 2022
741
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Circle():
  2.     def __init__(self, r):
  3.         self.radius = r
  4.  
  5.     def area(self):
  6.         return self.radius**2*3.14
  7.    
  8.     def perimeter(self):
  9.         return 2*self.radius*3.14
  10.  
  11. NewCircle = Circle(8)
  12. print("Area = ",NewCircle.area())
  13. print("Perimeter = ",NewCircle.perimeter())
Advertisement
RAW Paste Data Copied
Advertisement