1. 程式人生 > >python3, day1,登錄接口

python3, day1,登錄接口

div brush name 一個 loging 文件 ror user inpu

#!/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,登錄接口