import re
import os
filename = “studentsystem.txt“
def main():
ctrl = True
while (ctrl):
menu()
option = input(“Pleaseinput your choice:“)
option_str = re.sub(“\D“ ““ option)
if option_str in [“0“ “1“ “2“ “3“ “4“ “5“ “6“ “7“]:
option_int = int(option_str)
if option_int == 0:
print(“You have exited the system!“)
exit()
elif option_int == 1:
insert()
elif option_int == 2:
search()
elif option_int == 3:
delete()
elif option_int == 4:
modify()
elif option_int == 5:
sort()
elif option_int == 6:
total()
elif option_int == 7:
show()
def menu():
print(‘‘‘
——————————————————————学生信息管理系统————————————————————
| |
| =======
评论
共有 条评论