用户登录 (三次机会重试)

count = 0
while count < 3:
    user = input('>>>')
    pwd = input('<<<')
    if user == 'alex' and pwd == '123':
         print('欢迎登录')
         print('.....')
         break 
    else:
         print('用户名或者密码错误')
    count = count + 1        

  

posted on 2019-04-29 23:58  ElliottChao  阅读(130)  评论(0)    收藏  举报