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

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

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

  

猜你喜欢

转载自www.cnblogs.com/elliottchao/p/10793623.html
今日推荐