激动的入门,开启新世界的钥匙!
作者:互联网
i = 3
username = "ayi"
password = "123"
x = "yes"
j = 0
while i > 0:
a = input("请输入用户名:")
b = input("请输入密码:")
i -= 1
j += 1
if username == a and password == b:
print("欢迎进入阿一的世界!")
break
else:
if i == 0:
print("机会用完。")
y = input("是否想请爸爸帮忙?")
if y == x:
i = 3
if j == 6:
print("为你的坚持喝彩")
print("欢迎进入阿一的世界!")
break
else:
print("那请去别处")
break
if i == 3:
print("好吧好吧,再给你3次机会。")
else:
print("账号密码错误,您还有%s次机会" %(i))
标签:入门,else,break,钥匙,print,input,password,新世界,阿一 来源: https://www.cnblogs.com/ayi-world/p/10427852.html