diy4.py
431 Bytes
username="python"
userpassword="123456"
while True:
name=input("用户名:")
password=input("密码:")
if username==name and userpassword==password:
print("登录成功")
break
if username!=name:
print("用户名错误!请重新输入!")
continue
if userpassword!=password:
print("密码错误!请重新输入!")
print("欢迎来到贝尔编程")