diff --git a/Code/Philip/Python/Lab14_ATM.py b/Code/Philip/Python/Lab14_ATM.py index b2613a2b..ef3bfddb 100644 --- a/Code/Philip/Python/Lab14_ATM.py +++ b/Code/Philip/Python/Lab14_ATM.py @@ -1,6 +1,7 @@ '''ATM Lab14 By Philip Bartoo 10/25/21 +Updated 1/16/22 ''' class ATM: @@ -12,8 +13,11 @@ def check_balance(self): return self.balance def deposit(self, amount): - self.balance += amount - return self.balance + if amount < 0: + return print("Not Allowed") + else: + self.balance += amount + return self.balance def check_withdrawal(self, amount): if self.balance - amount > 0: @@ -80,5 +84,4 @@ def calc_interest(self): break else: - print('Command not recognized') - + print('Command not recognized') \ No newline at end of file