这嵌套循环是问题吗?一直显示if哪里是无效语法
#模拟银行卡取款card1='1001'
pwd1='123456'
ban1=1600
card2='1002'
pwd2='123456'
ban2=500
card3='1003'
pwd3='123456'
ban3=10000
card4='1004'
pwd4='123456'
ban4=1000054
print('欢迎来到Python银行!')
times=1
while True:
card=input("请输入银行卡号!")
pwd=input('请输入密码!')
ban=0 #余额
if card==card1 and pwd==pwd1:
ban=ban1
elif card==card2 and pwd==pwd2:
ban=ban2
elif card==card3 and pwd==pwd3:
ban=ban3
else:
times=times+1
if times>=3:
print('三次输入错误,请您联系柜台!')
break
else:
print('卡号密码错误!请重新输入')
continue
while True:
num=input('请输入要办理的业务:1.存款 2.取款 3.退卡')
if num=='1':
inn=float(input('请输入存款金额:'))
if inn<=0:
print('存款金额请大于0!')
else:
ban=ban+inn
print('存款成功!存入',inn,'余额',ban,)
elif num=='2':
out=float(input('请输入取款金额:')
if out>ban:
print('余额不足!')
continue
else:
ban=ban-out
print('取款成功!取出:',out,'余额:',ban)
elif num=='3':
print('请收好卡片,欢迎下次再来!')
break
else:
print('输入有误!')
continue