python实现会员信息管理系统(List)
作者:sober998 时间:2021-12-21 04:50:45
题目要求
1.后台管理员只有一个用户:admin, 密码: admin
2.当管理员登陆成功后,可以管理前台会员信息。
3.会员信息管理包括:
添加会员信息
删除会员信息
查看会员信息
退出
代码示例
print('管理员登陆'.center(50,'*'))
inuser=input('Username:')
inpasswd=input('Password:')
users = ['root','westos']
passwds=['123','456']
if inuser=='admin' and inpasswd=='admin':
print('管理员登陆成功!')
print('会员信息管理'.center(50,'*'))
while True:
print("""
功能:
1. 添加会员信息
2. 删除会员信息
3. 查看会员信息
4. 退出
""")
choice=input('输入你要选择的功能:')
if choice=='1':
print('添加会员信息'.center(50,'*'))
adduser=input('添加会员名:')
if adduser in users:
print('会员%s已存在!'%adduser)
else:
addpasswd=input('输入密码:')
users.append(adduser)
passwds.append(addpasswd)
print('会员%s信息添加成功!'%adduser)
elif choice=='2':
print('删除会员信息'.center(50,'*'))
deluser=input('删除会员名:')
if deluser in users:
delindex=users.index(deluser)
users.remove(deluser)
passwds.pop(delindex)
print('删除会员%s成功!'%deluser)
else:
print('会员%s不存在!'%deluser)
elif choice=='3':
print('查看会员信息'.center(50,'*'))
print('\t会员名\t密码')
usercount=len(users)
for i in range(usercount):
print('\t%s\t%s'%(users[i],passwds[i]))
elif choice=='4':
print('退出会员管理系统')
exit()
else:
print('管理员登陆失败!')
运行结果
来源:https://blog.csdn.net/qq_42006358/article/details/106268981
标签:python,信息,管理系统
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Microsoft SQL Server数据库SA权限总结
2009-01-06 11:32:00
Dreamweaver MX 2004表格设计
2008-02-03 11:36:00
![](https://img.aspxhome.com/file/UploadPic/20072/20072311363330s.jpg)
如何将 awk 脚本移植到 Python
2022-02-28 05:40:52
Python 安装第三方库 pip install 安装慢安装不上的解决办法
2023-02-23 13:43:45
![](https://img.aspxhome.com/file/2023/7/65017_0s.png)
关于大批量数据高效插入方法
2010-07-31 19:07:00
Python编程使用PyQt5制作动态钟表示例
2021-10-06 03:20:17
![](https://img.aspxhome.com/file/2023/6/78756_0s.gif)
python逆向微信指数爬取实现步骤
2022-03-31 03:36:48
![](https://img.aspxhome.com/file/2023/2/81602_0s.jpg)
python:批量统计xml中各类目标的数量案例
2021-11-17 05:22:44
![](https://img.aspxhome.com/file/2023/6/88916_0s.jpg)
JavaScript Dom编程:介绍学习书籍
2008-02-20 08:32:00
解决python中os.system调用exe文件的问题
2023-11-29 14:46:13
![](https://img.aspxhome.com/file/2023/0/63190_0s.png)
用于统计项目中代码总行数的Python脚本分享
2022-05-11 17:37:11
javascript 模拟函数指针
2009-09-19 18:02:00
常用的三种修改mysql最大连接数的方法
2010-03-09 15:42:00
Oracle性能究极优化
2010-07-30 13:02:00
Python手拉手教你爬取贝壳房源数据的实战教程
2023-07-10 12:58:36
![](https://img.aspxhome.com/file/2023/9/78499_0s.png)
Python学习之用pygal画世界地图实例
2021-03-22 13:04:47
![](https://img.aspxhome.com/file/2023/9/64729_0s.jpg)
Dreamweaver MX 2004 试用心得
2010-03-25 12:21:00
![](https://img.aspxhome.com/file/UploadPic/20071/200713110316860s.gif)
MySQL与PHP的基础与应用专题之数据控制
2023-11-23 01:03:21
![](https://img.aspxhome.com/file/2023/8/99348_0s.png)
谈谈网页设计中的字体应用 (3) 实战应用篇·上
2009-11-24 13:09:00
![](https://img.aspxhome.com/file/UploadPic/200911/24/202939796-72s.gif)
Go 代码生成工具详解
2023-06-18 21:11:48
![](https://img.aspxhome.com/file/2023/8/89028_0s.png)