用户(三次)登录--作业小编完成

count = 0
while count < 3:
    user = input('请输入用户名>>>')
    pwd = input('请输入密码>>>')
    if user == 'huang' and pwd == '123':
        print('欢迎进入黑客帝国')1
        print('...................')
        break
    else:
        print('用户名或密码错误')
    count = count + 1
原文地址:https://www.cnblogs.com/huangjinshan/p/6155017.html