1 i = 0
 2 while i < 3:
 3     username = input('please input your username: ')
 4     password = input('please input your password: ')
 5     if username == 'test' and password == '123456':
 6         print('登录成功!')
 7         break
 8     else:
 9         print('登录失败,请重新输入用户名与密码。。。')
10     i += 1

 

posted on 2018-08-20 17:16  蕾拉  阅读(287)  评论(0编辑  收藏  举报