1.用户登录(三次机会重试)
n = 1
while n < 4
user = input(">>>")
pwd = input(">>>")
if user == "alex" and pwd == ("123")
print('欢迎登录‘’)
break 终止所有循环
else
print(‘用户密码错误’)
n = n + 1
本文共 233 字,大约阅读时间需要 1 分钟。
1.用户登录(三次机会重试)
n = 1
while n < 4
user = input(">>>")
pwd = input(">>>")
if user == "alex" and pwd == ("123")
print('欢迎登录‘’)
break 终止所有循环
else
print(‘用户密码错误’)
n = n + 1
转载于:https://www.cnblogs.com/yyk520/p/11111797.html