标签:ase 输入 please new name 编写 for 锁定 system
输入用户名密码;
登入成功后提示欢迎信息;
三次登入失败后锁定。
编写如下:
# Author: Ewan Wang
for i in range(3):
username = input("username:")
password = input("password:")
if username =="Wang"and password =="123":
print("Welcome to the new world!")
break
else:
print("Username or password is wrong,please re-enter...")
else:
print("The system has been locked.")
标签:ase 输入 please new name 编写 for 锁定 system
原文地址:http://www.cnblogs.com/akonj3/p/7593884.html