Advertisement
morty0505

Untitled

Oct 18th, 2016
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class Sirkel:
  2. def __init__(self, radius):
  3. self.radius = radius
  4.  
  5. def omkrets(self):
  6. return 2*3.14*self.radius
  7.  
  8. def areal(self):
  9. return 3.14*self.radius**2
  10.  
  11.  
  12.  
  13. for r in range(1,5):
  14. sirkel = Sirkel(r)
  15. print("Radius {} : omkrets = {} , areal = {} ".format(r,sirkel.omkrets(),sirkel.areal()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement