mainMenu(menu)
,它没有显示函数内容。为什么?(顺便说一句,我只是想做一台自动取款机,只是为了练习我学到的一些东西并巩固它
print "Hello ! Welcome to JD's bank"
print
print "Insert bank card and press any key to procede"
print
raw_input()
passcode = 1111
attempts = 0
while passcode == 1111:
passcodeInsertion= raw_input("Please insert your 4-digit code: ")
print""
if passcodeInsertion == str(passcode):
print "This is working" #testing-----
print ""
mainMenu(menu)
elif attempts < 2:
print "Sorry ! Wrong passcode"
attempts += 1
print "------------------------------------------------"
print ""
print"Try again !! This is your " + str(attempts) + " attempt"
print
print "------------------------------------------------"
print
else:
print""
print "Your card is unfortunately now blocked"
exit()
def mainMenu(menu):
print "------------------------------------------------"
print "Select one of this options"
print "1. Check Balance"
print "2. Withdraw Money"
print "3. Deposit Money "
print "0. Exit "
print "------------------------------------------------"
目前没有回答
相关问题 更多 >
编程相关推荐