我的python之路2

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

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

 

posted @ 2019-01-05 13:50  流水众生  阅读(75)  评论(0编辑  收藏  举报