Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Complex:
- def create(self, real_part, imag_part):
- self.r = real_part
- self.i = imag_part
- class Calculator:
- def add(self, amount):
- self.current += amount
- def get_current(self):
- return self.current
- cal = Calculator()
- cal.add(10)
- print(cal.get_current())
Add Comment
Please, Sign In to add comment