#! usr/bin/env python#!-*-conding:utf-8-*-#第一步:定義變數 name = 'python' passwd = 'password'#第二步:寫while迴圈 定義count=0#第三步:判斷count=3則列印print("Account Be Locke ...
#! usr/bin/env python
#!-*-conding:utf-8-*-
#第一步:定義變數 name = 'python' passwd = 'password'
#第二步:寫while迴圈 定義count=0
#第三步:判斷count=3則列印print("Account Be Locked!!Please Change User")並跳出程式break
#第四步:用input模塊和用戶交互
#第五步:if判斷用戶輸入是否何定義變數的值相同,用戶名和密碼匹配則列印Welcome Login...並跳出程式break
#第六步:if判斷用戶輸入和定義用戶和密碼不匹配則迴圈三次退出程式
name = 'python'
passwd = 'password'
count = 0
while True:
if count == 3:
print("Account Be Locked!!Please Change User")
break
username =input("Please input your name :")
password =input("Please input your password:")
if username == name and password == passwd:
print("Welcome Login...")
break
else:
print("Login falied ,Please again Try...Thank you!")
count +=1