Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- bank_account = 0 # счёт, на котором лежат деньги
- while (True):
- os.system('CLS')
- print("Hello, Mr.Trixter")
- print("Please select action")
- print("1 - Show money")
- print("2 - Put money")
- print("3 - Get money")
- print("4 - Exit")
- button = int(input())
- if (button == 1):
- os.system('CLS')
- print("Your money " + str(bank_account))
- elif (button == 2):
- os.system('CLS')
- print("Enter the amount")
- cash = int(input())
- bank_account += cash
- elif (button == 3):
- os.system('CLS')
- print("Enter the amount")
- cash = int(input())
- # TODO: Если на счёте нет денег, то мы сейчас всё равно можем их снять))
- # TODO: if(???)
- bank_account -= cash
- elif (button == 4):
- break
- else:
- continue
- print("Please select action")
- print("1 - Main menu")
- print("2 - Exit")
- button = int(input())
- if (button == 1):
- flag = True
- elif (button == 2):
- flag = False
- # TODO: Обработка ошибки неправильного ввода
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement