Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson5_7

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 2b33fd74 authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent 99c83828
Hide whitespace changes
Inline Side-by-side
Showing with 47 additions and 0 deletions
  • diy2.py
diy2.py 0 → 100644
View file @ 2b33fd74
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
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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