Commit c777b676 by BellCodeEditor

save project

parent 30ae6ada
Showing with 6 additions and 2 deletions
...@@ -3,14 +3,18 @@ userpassword = "54188" # 保存在服务器数据库中的用户密码(正 ...@@ -3,14 +3,18 @@ userpassword = "54188" # 保存在服务器数据库中的用户密码(正
while True: while True:
name1=input("名字") name1=input("账号")
name=input("密码") name=input("密码")
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
if name1==username and name==userpassword: if name1==username and name==userpassword:
print("登录成功") print("登录成功")
break break
print("登录失败") if name != userpassword:
print("密码错误")
continue
if name1 != username:
print("账号错误")
print("欢迎来到手机手机世界") print("欢迎来到手机手机世界")
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment