标签:条件语句 choice adobe username weight 条件 family 密码 ado
#三次登录机会是否继续游戏
#三次登录机会是否继续游戏
count = 1
while count<=3:
username = input(‘请输入用户名:‘)
password = input(‘请输入密码‘)
n = 3-count
if username == ‘whzc‘ and password == ‘whzc‘:
print(‘欢迎登录‘)
break
else:
print(‘用户名或密码错误,您还有‘,n,‘ 次机会‘)
if count==3:
choice = input(‘请输入是否继续(Y/N)‘)
if choice==‘N‘:
break
elif choice==‘Y‘:
count = 1
continue
else:
print(‘输入错误‘)
break
count+=1
标签:条件语句 choice adobe username weight 条件 family 密码 ado
原文地址:https://www.cnblogs.com/witchingsong/p/12143516.html