Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MojaKlasa:
- def __init__(self, a):
- self.a = a
- def potega(self):
- wynik = self.a ** 2
- return wynik
- b = MojaKlasa(2)
- c = b.potega()
- print(c)
- ##############################################
- class MojaKlasa:
- def __init__(self, a):
- self.a = a
- def potega(self):
- self.wynik = self.a ** 2
- b = MojaKlasa(2)
- b.potega()
- print(b.wynik)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement