用户登录,三次机会重试
count=0
while count<3:
user=input(">>>")
pwd=input("<<<")
if user=="damao" and pwd=="123":
print("欢迎登录")
break
else:
print("<账号密码错误,请重新输入>")
count=count+1
if count == 3:
print('三次机会已用尽,请联系客服')
else:
pass
count=0
while count<3:
user=input(">>>")
pwd=input("<<<")
if user=="damao" and pwd=="123":
print("欢迎登录")
break
else:
print("<账号密码错误,请重新输入>")
count=count+1
if count == 3:
print('三次机会已用尽,请联系客服')
else:
pass