用户登录,三次机会重试

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

  

posted @ 2025-05-25 10:43  大猫学编程  阅读(10)  评论(0)    收藏  举报