# _user = "alex"
# _passwd = "abc123"
#
# passed_authentication = False #假
#
# for i in range (3):
# username = input("Username:")
# password = input("Password:")
#
# if username == _user and password == _passwd:
# print("Welcome %s login..."%_user)
# passed_authentication = True
# break
# else:
# print("Invalid username or password!")
# if not passed_authentication:
# print("不要比连")
_username = "Zoom"
_mima = "1234"
for i in range(3):
username = input("name:")
password = input("password:")
if username == _username and _mima == password:
print("welcome the word")
break
else:
print("no away")
else:
print("buyaobilian")
上面是老师教的下面是自己写的