Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Bancomat:
- def __init__(self):
- self.balance = 0
- def replenishment(self,replenishment): #ПОПОЛНЕНИЕ
- self.balance += replenishment
- def withdrawing_funds(self, withdrawal): #СНЯТИЕ
- if self.balance > withdrawal:
- self.balance -= withdrawal
- else:
- print("Balance Error")
- def balance_check(self): #ПРОВЕРКА БАЛАНСА
- print("Баланс = ",self.balance)
- bancomat = Bancomat()
- bancomat.replenishment(int(input("Введите сколько вы хотите пополнить - ")))
- bancomat.withdrawing_funds(int(input("Введите сколько вы хотите снять - ")))
- bancomat.balance_check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement