热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_47995914
生客
1 年前
trueweixin_47995914


def menu():
print('''\n欢迎使用PYTHON学生通讯录
1:添加学生
2:删除学生
3:修改学生信息
4:搜索学生
5:显示全部学生信息
6:退出并保存''')
def chaxun_student(name):
if name in dic:
print(name+" "+" ".join(dic[name]))
print("Success")
print(dic)
else:
print("No Record")
print(dic)

# 示例程序
dic = {'张自强': ['12652141777', '材料'], '庚同硕': ['14388240417', '自动化'], '王岩': ['11277291473', '文法']}
print(dic)
menu()
while True:
choice = input()
if choice == "1":
print("ERROR")
elif choice == "2":
print("ERROR")
elif choice == "3":
print("ERROR")
elif choice == "4":
name = input()
chaxun_student(name)
elif choice == "5":
print("ERROR")
elif choice == "6":
print("ERROR")
break
else:
print("ERROR")

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
将机器学习项目从笔记本转移到实际生产中的管道需要什么?Benjamin Etienne 概述了你应该知道的挑战、最佳实践和实用方法。https://buff.ly/3UU5leX
立即登录