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

username = '987654321'
password = '123456789'
count = 0
while count < 3:
    c = input('请输入账号:')
    d = input('请输入密码:')
    if c == username and d == password:
        print('登陆成功')
    else:
        print('登录失败')
    count += 1

 

posted @ 2019-02-25 10:20  JJJay  阅读(143)  评论(0)    收藏  举报