Requirements:
The menu is shown below:
1 – Balance Inquiry
2 – Withdraw
3 – Deposit
X – Exit
Score will be updated before encoded in BBL for the following:
Input
1. data
Output
Enter·pin:·123489
1·–·Balance·Inquiry
2·–·Withdraw
3·–·Deposit··
X·–·Exit
Enter·your·choice:··X
Thank·you·for·banking·with·us!
balance = 1000
i = 0
a = (input("Enter·pin:·"))
print("1·–·Balance·Inquiry\n2·–·Withdraw\n3·–·Deposit··\n 4.Exit")
command = int(input("Enter number command"))
def BalanceInquiry(Balance):
return balance
def Withdraw(Withdraw):
if Withdraw >= balance:
return None
else:
return balance - Withdraw
def Deposit(deposit):
return deposit+balance
if command == 1:
print(balance)
if command == 2:
n = int(input("Enter withdraw money"))
print(Withdraw(n))
if command == 3:
n1 = int(input("Enter deposit money"))
print(Deposit(n1))
if command == 4:
print("Good bye")
Comments
Leave a comment