学生管理系统初版
pag_indexpage="""
学生管理系统
==================
1."添加学生"
2."修改学生"
3,"查询学生"
4."删除学生"
5."返回"
==================
"""
name=''
age=0
tel=0
sex=''
list_stu=[ ]
dic1_stu = {'姓名:': '王', '年龄:': 12, '电话:': 18990909090, '性别:': '女'}
while True:
print(pag_indexpage)
choose=int(input("请选择1-5:"))
if choose ==1:
while True:
print("添加学生")
dic1_stu["姓名:"] = input( )
dic1_stu["年龄:"] = int(input())
dic1_stu["电话:"] = int(input())
dic1_stu["性别:"] = input()
print(dic1_stu)
print("添加成功")
print("1.继续")
print("2.返回")
choose1=0
choose1=int(input("请选择继续OR返回:"))
if choose1 == 1:
print("1.继续")
elif choose1 == 2:
print("2.退出")
break
elif choose == 2:
while True:
print(pag_indexpage)
choose = int(input("请选择1-5:"))
print("修改学生")
print(dic1_stu)
dic1_stu["姓名"]="张三"
dic1_stu["年龄"] = 10
dic1_stu["电话"] = 1333333333
dic1_stu["性别"] = "男"
print(dic1_stu)
print("1.继续")
print("2.返回")
choose2=0
choose2=int(input("请选择继续OR返回:"))
if choose2==1:
print("1.继续")
elif choose2==2:
print("2.退出")
break
elif choose == 3:
while True:
print("查看学生")
print("1.查看所有学生")
print("2.按姓名查看")
print("3.按学号查看")
print("4.返回")
choose3=0
choose3 = int(input("请选择:"))
if choose3==1:
print("1.查看所有学生")
print(dic1_stu)
elif choose3==2:
print("2.按姓名查看")
dic1_stu["姓名:"]
print(dic1_stu)
elif choose3==3:
print("3.按学号查看")
else:
print("4.返回")
break
elif choose == 4:
print("删除学生")
else:
print("返回")
break