首页 > 代码库 > python3, day1,登录接口

python3, day1,登录接口

#!/usr/bin/env python
# 登录接口
# Author: Msl23
 
_username = ‘Msl23‘
_password = ‘123.com‘
count = 0
while count < 3:
    username = input(‘Username: ‘)
    password = input(‘Password: ‘)
    if username == _username and password == _password:
        print(‘Welcome,User:%s‘ %(_username),‘Loging!‘)
        break
    else:
        print(‘Error: Username Or Password..‘)
    count = count + 1
else:
    print(‘Input the number three times..‘)

  没有学调用文件这些,所以只能用已知知识来做一个简单的了!

python3, day1,登录接口