Advertisement
GroZnik81

circle 100100

Mar 20th, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement