Guest User

Untitled

a guest
Feb 22nd, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. class Complex:
  2. def create(self, real_part, imag_part):
  3. self.r = real_part
  4. self.i = imag_part
  5.  
  6. class Calculator:
  7.  
  8. def add(self, amount):
  9. self.current += amount
  10.  
  11. def get_current(self):
  12. return self.current
  13.  
  14.  
  15. cal = Calculator()
  16. cal.add(10)
  17. print(cal.get_current())
Add Comment
Please, Sign In to add comment