GroZnik81

circle 100100

Mar 20th, 2021
39
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Circle:
  2.     pi = 3.14
  3.     def __init__(self, radius):
  4.         pi = 3.14
  5.         self.radius = radius
  6.         self.pi = pi
  7.  
  8.     def set_radius(self,new_radius):
  9.         self.radius = new_radius
  10.  
  11.     def get_area(self):
  12.         area = self.pi * self.radius**2
  13.         return area
  14.  
  15.     def get_circumference(self):
  16.         res = 2 * self.radius * self.pi
  17.         return res
  18.  
RAW Paste Data