Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. def __init__(self, cust_id, checking_total_amount):
  2. Account.__init__(self, cust_id)
  3. self.checking_total_amount = checking_total_amount
  4.  
  5. def grab_from_savings(self):
  6. moved_amount = 0
  7. moved_amount.move_to_checking()
  8. self.checking_total_amount += moved_amount.move_to_checking()
  9.  
  10. return self.checking_total_amount
  11.  
  12. def __init__(self, cust_id, savings_total_amount):
  13. Account.__init__(self, cust_id)
  14. self.savings_total_amount = savings_total_amount
  15.  
  16. def move_to_checking(self, amount_to_move):
  17. if amount_to_move <= self.savings_total_amount:
  18. self.savings_total_amount -= amount_to_move
  19. return amount_to_move
  20. else:
  21. return "insufficient funds!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement