d = {'jay': 'jayzhou'}
while True:
name = input('请输入您的用户名:')
if name in d:
break
else:
print('您输入的用户名不存在,请重新输入')
continue
# password
count = 5
while count:
password = input('请输入您的密码:')
if d[name] == password:
print('-------------------------------------------------------------------------------------')
print('大帅比,欢迎进入系统')
print('-------------------------------------------------------------------------------------')
break
else:
count -=1
print('您输入的密码不正确,还有{}次输入机会'.format(count))
continue
while循环+用户登录接口
于 2022-02-11 15:03:08 首次发布