python3.6 project: bank deposit system

card1 = "1001" # card number
pwd1 = "1001" # password
ban1 = 10000 # balance
card2 = "1002"
pwd2 = "1002"
ban2 = 12000
card3 = "1003"
PWD3 = "1003"
ban3 = 14000
TIME1 = 0 # input the number of errors
time2 = 3 # enter the number of remaining
the while True:
TIME1 + 1 = TIME1
TIME2 = TIME1 3-
Print ( "Welcome to the future Bank")
Card = the iNPUT ( "Please enter your card number:")
pwd = the iNPUT ( " Please enter your password: ")
in Ban = 0 # balance
IF Card card1 and pwd == == pwd1:
in Ban = ban1
elif Card card2 and pwd == == pwd2:
in Ban = ban2
elif Card and pwd == == card3 PWD3:
in Ban = ban3
the else:
Print ( "you have the first", time1, "unsuccessful attempts to enter, and there", time2, "opportunity")
IF TIME1> = 3:
Print ( "unsuccessful attempts to enter the card has been frozen, please contact the counter!")
BREAK
print ( "Wrong password, please re-enter")
the Continue
the while True:
NUM = the INPUT ( "Please enter handle the business: 1. withdrawal 2. deposit 3. The back of the card")
IF NUM == "1":
CUN = float (input ( "Please enter the deposit amount:"))
IF CUN <= 0:
Print ( "Please deposit greater than 0!")
the else:
in Ban in Ban + = CUN
Print ( "deposit has been successful, into:", cun, "balance : ", Ban)
elif NUM ==" 2 ":
Qu = a float (iNPUT (" Please enter a withdrawal amount: "))
IF Qu <= 0:
Print (" withdrawal request is greater than 0 ")!
the else:
Ban = ban- qu
Print ( "withdrawal successful, remove:", qu, "the balance:", in Ban)
elif NUM == "3":
Print ( "! back of the card successfully, please take the card")
BREAK
the else:
Print ( "no such business Please re-enter! ")
the Continue

 

 

Guess you like

Origin www.cnblogs.com/lma0702/p/11109085.html