1. 程式人生 > >2017-08-21Python作業

2017-08-21Python作業

python day1作業

編寫一個登陸接口:

賬戶密碼輸入

認證成功後顯示歡迎信息

輸錯3次後鎖定

_username = 101645
_password = 101645
for i in range(100):
    username = int(input("username:"))
    password = int(input("password:"))
    if username == _username and password == _password:
        print("Wlcome to system")
        break
    if username != _username and password != _password:
        print("The users and password is error")
        if i == 2:
            print("the system is locking")
            break


2017-08-21Python作業