diy2.py
729 Bytes
i=0
username = "QWERTYUIOPASDFGHJKLZXCVBNM"
userpassword = "MNBVCXZLKJHGFDSAPOIUYTREWQ"
while True:
if i<3:
name = input("请输入用户名:")
password = input("请输入密码:")
i+=1
if name == username and password == userpassword:
print("登录成功!")
break
if name != username:
print("用户名错误!请重新输入")
continue
if password != userpassword:
print("密码错误!请重新输入")
if password != userpassword and name != username:
print("用户名和密码错误!请重新输入")
else:
print("!@#$%^&*()_+|}{:?><")
exit()
print("欢迎来到贝尔编程!")