Commit 2b33fd74 by BellCodeEditor

auto save

parent 99c83828
Showing with 47 additions and 0 deletions
shujuku={}
yongyou={}
print("欢迎来到账号注册系统。")
print("注(在开始程序1,2或3时,无法退出。)")
while True:
answer=input("登录请按1,注册请按2,注销请按3,退出请按q:")
if answer=="1":
zhanghao=input("你的账号是:")
if zhanghao in shujuku:
mima=input("你的密码是:")
if shujuku[zhanghao]==mima:
print("登录成功。")
print("拥有者的名字是:",yongyou[zhanghao])
continue
else:
print("密码不正确,程序刷新。")
continue
else:
print("不存在这个账号,程序刷新。")
continue
if answer=="2":
zhanghao=input("请输入你要注册的账号名:")
mima=input("请设置你的密码:")
name=input("请输入拥有者的名字:")
shujuku[zhanghao]=mima
yongyou[zhanghao]=name
print("注册成功,程序刷新。")
continue
if answer=="3":
zhanghao=input("请输入要注销的账号:")
if zhanghao in shujuku:
mima=input("请输入该账号的密码:")
if shujuku[zhanghao]==mima:
print("该账号已成功注销,程序刷新。")
shujuku.pop(zhanghao)
yongyou.pop(zhanghao)
continue
else:
print("密码不正确,程序刷新。")
continue
else:
print("不存在这个账号,程序刷新。")
continue
if answer=="q":
print("退出程序。")
exit()
\ No newline at end of file
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