Python project development case (1)————Student Information Management System

1. Student Information Management System

        This chapter uses Python language to develop a student information management system, which can help teachers quickly enter student information, and perform basic addition, deletion, modification, and check operations on student information; it can also be viewed in a macro view based on the sorting function The students’ grades are arranged from high to low to keep abreast of the students’ recent learning status at any time, and save the student’s information to a disk file in real time.

1.1 Demand analysis

        In order to meet the needs of users to obtain data in the Internet age, the student information management system should have the following functions:

  • Add student and grade information;
  • Save student information in a file;
  • Modify and delete student information;
  • Query student information;
  • Sort according to student performance;
  • Count the total scores of students.

1.2 System design

1.2.1 System function structure

        The student information management system is divided into 7 functional modules, which mainly include the input student information module, the search student information module, the delete student information module, the modify student information module, the student performance ranking module, the total number of students statistics module and the display all student information module. The functional structure of the student information management system is shown in Figure 1.1.

                                                                            Figure 1.1 System function structure diagram

1.2.2 System business process

        Before developing a student information management system, it is necessary to understand the business process of the system. According to the needs analysis and functional structure of the student information management system, the system business process shown in Figure 1.2 is designed.

1.3 Required for system development

1.3.1 System development environment

The software development and operating environment of this system are as follows:

  • Operating system: Windows7, Windows10;
  • Python version: Python 3.7;
  • Development tools: Python IDLE;
  • Python built-in modules: os, re.

1.3.1 Folder organization structure

        The folder structure of the student information management system is relatively simple, including only one Python file. When running the program, a file named students.txt will be automatically created in the root directory of the project to save student information.

1.4 Main function design

1.4.1 Function overview

        The main function main() of the student information management system is mainly used to realize the main interface of the system. In the main function main(), the menu() function is called to generate the function selection menu, and the if statement is used to control the calling of each sub-function, so as to realize the functions of input, query, display, modification, sorting and statistics of student information.

1.4.2 The business process of the main function

        When designing the main function of the student information management system, we must first sort out its business process and implementation technology. According to the functions to be realized by the main function of the student information management system, the business process as shown in the figure is designed.

1.4.3 Implement the main function

        To run the student information management system, you will first enter the selection interface of the main function menu, where all the functions in the program are listed. The user can enter the number corresponding to the function to be executed or press the arrow key on the keyboard to enter the corresponding In the sub-function. Secondly, in the menu() function, the print() function is mainly used to output a functional menu composed of text and special characters from the console. When the user enters the function number or selects the corresponding function, the program will call different functions according to the function number selected by the user (if the function is selected by the arrow keys, the program will automatically extract the corresponding number). The specific number indicates the function as As shown in Table 1.1.

 

Numbering Features
0 Exit system
1 Enter student information and call the insert() function
2 Find student information, call the search() function
3 To delete student information, call delete() function
4 Modify student information, call modify() function
5 Sort students' grades and call the sort() function
6 Count the total number of students and call the total() function
7 Display the information of all students, call the show() function

                                                                        Table 1.1 The functions indicated by the numbers in the menu

The implementation code of the main function main() is as follows:

def main():
    ctrl = True                                         #标记是否退出系统
    while (ctrl):
         menu()                                         #显示菜单
         option = input(“请选择:”)                       #选择菜单项
         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('您已退出学生信息管理系统!')
                  ctrl = False
             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()

1.4.4 Show main menu

        In the main function main(), the menu() function is called to display the function menu. His specific code is as follows:

def menu():
#输出菜单
print("'

------------------学生信息管理系统-----------------
|                                                |
|====================功能菜单====================|
|                                                |
|                                                |
|     1 录入学生信息                              |
|     2 查找学生信息                              |
|     3 删除学生信息                              |
|     4 修改学生信息                              |
|     5 排序                                     |
|     6 统计学生总人数                            |
|     7 显示所有学生信息                          |
|     0 退出系统                                  |
|                                                |
|                                                |
|                                                |
|                                                |
|                                                |
|=============================================== |
|                                                |
|------------------------------------------------|

"')

 

1.5 Design of student information maintenance module

1.5.1 Overview of the student information maintenance module

        The student information maintenance module is used to maintain student information in the student information management system. It mainly includes entering student information, modifying student information, and deleting student information. These student information will be saved to a disk file. Among them, when the user enters the number "1" in the function selection interface (or uses the arrow keys to select the menu item "1 Enter student information"), the user can enter the student information entry function. Here you can enter student information in batches and save it to a disk file. The running effect is shown in the figure.

        When the user enters the number "3" in the function selection interface (or uses the arrow keys to select the "3 delete student information" menu item), it will enter the delete student information function interface. Here you can delete the specified student information from the disk file according to the student ID, and the running effect is shown in the figure.

        When the user enters the number "4" in the function selection interface (or uses the arrow keys to select the "4 modify student information" menu item), it will enter the function interface for modifying student information. Here you can modify the specified student information according to the student ID, and the running effect is shown in the figure.

1.5.2 Realize the function of inputting student information

1. Function overview

        The function of inputting student information is mainly to obtain the student information entered by the user on the console and save them to a disk file to achieve the purpose of permanent preservation. For example, input function number 1 on the function menu and press the <Enter> key. The system will prompt to input student number, student name, English score, Python score and C language score. After entering the correct information, the system will Prompt whether to continue adding, as shown in the figure. Enter "y", the system will prompt the user to enter student information again, and enter "n", the system will save the entered student information to a file.

2. Business Process

        When realizing the function of inputting student information, we must first sort out its business process and implementation technology. The business process and implementation technology of entering student information are shown in the figure.

3. Concrete realization

(1) Write a function to write the specified content to the file, and name it save(). The function has a list-type parameter to specify the content to be written. The specific code of the save() function is as follows:

#将学生信息保存到文件
def save(student)
    try:
        student_txt = open(filename,"a")       #以追加模式打开
    except Exception as e:
        student_txt = open(filename,"w")       #文件不存在,创建文件并打开
    for info in student:
        student_txt.write(str(info)+"\n")      #按行存储,添加换行符
    student_txt.close()                        #关闭文件  
  • In the above code, a file will be opened in append mode, and the try...except statement will be used to catch the exception. If an exception occurs, it means that there is no file to open. Then create and open the file in write mode. Then write the elements in the list into the file line by line through the for statement, and add a newline at the end of each line.

(2) Write the function insert() that calls the main function and enters student information. In this function, first define an empty list to save student information, and then set up a while loop, in which the user is required to input student information (including student ID, name, English score, Python score and C language through the input() function Grades). If these contents meet the requirements, save them in the dictionary, then add the dictionary to the list and ask whether to continue the entry; if it is no longer entered, end the while loop and call the save() function to enter the student information Save to file. The specific code of the insert() function is as follows:

def insert():
    stdentList = []                                         #保存学生信息的列表
    mark = True                                             #是否继续添加
    while mark:
          id = input(“请输入ID(如1001):”)
          if not id:                                        #ID为空,跳出循环
               break
          name = input("请输入名字:")
          if not name:                                      #名字为空,跳出循环
               break
          try:
               english = int(inpu("请输入英语成绩:"))
               python = int(inpu("请输入Python成绩:"))
               c = int (inpu("请输入C语言成绩:"))
          except:
              print("输入无效,不是整型数值....重新录入信息")
              continue
          #将输入的学生信息保存到字典
          stdent  = {"id":id,"name":name,"english":english,"python":python,"c":c}
          stdentList.append(stdent)                        #将学生字典添加到列表中
          inputMark = input("是否继续添加?(y/n):") 
          if inputMark == "y":                             #继续添加
              mark  = True
          else:                                            #不继续添加
              mark = False  
    save(stdentList)                                       #将学生信息保存到文件
    print("学生信息录入完毕!!!")
  • In the above code, a mark variable mark is set to control whether to exit the loop.

(3) After entering the student information, a file named students.txt will be created in the root directory of the project, and the student information will be stored in the file. For example, after entering 2 pieces of information, the content of the students.txt file is as shown in the figure.

1.5.3 Realize the function of deleting student information

1. Function overview

        The function of deleting student information is mainly the student ID entered by the user on the console, find the corresponding student information in the disk file, and delete it. For example, enter the function number "3" on the function menu and press the <Enter> key, the system will prompt to enter the number of the student to be deleted, after entering the corresponding student ID, the system will directly delete the student information from the file, and Prompt whether to continue deleting, as shown in the figure. Enter "y", the system will prompt the user again to enter the student number to be deleted, and enter "n" to exit the delete function.

2. Business Process

        When implementing the function of deleting student information, we must first sort out its business process and implementation technology. According to the function to be realized, design the business process and realization technology as shown in the figure.

3. Concrete realization

        Write the function delete() called in the main function to delete student information. In this function, set up a while loop. In this loop, the user is required to input the student ID to be deleted through the input() function; then the file that saves student information is opened in read-only mode, and its content is read and saved to a list Middle; Open the file that saves student information in writing mode, and traverse the list of saved student information, and convert each element into a dictionary, so that it is convenient to judge whether it is the information to be deleted according to the input student ID. If it is not the information to be deleted, write it back to the file. The specific code of the delete() function is as follows:

def delete():
    mark = True                                         #标记是否循环
    while mark:
        studentId = input("请输入要删除的学生ID:")
        if studentId is not "":                         #判断是否输入要删除的学生
             if os.path.exists(filename):               #判断文件是否存在
                 with open(filename,'r') as rfile:      #打开文件
                     student_old = rfile.readlines()    #读取全部内容
             else:
                 student_old = []
             ifdel = False                              #标记是否删除
             if student_old:                            #如果存在学生信息
                 with open(filename,'w')as wfile:       #以写方式打开文件
                    d = {}                 
                    for list in student_old: 
                        d= dict(eval(list))             #字符串转字典
                        if d['id'] != studentId:
                            wfile.write(str(d) + "\n")  #将一条学生信息写入文件
                        else:
                            ifdel = True                #标记已经删除
                    if ifdel:
                        print("ID为%s的学生信息已经被删除..." % studentId)
                    else:
                        print("没有找到ID为 %s 的学生信息..." % studentId)
             else:                                     #不存在学生信息
                 print("无学生信息...")
                 break                                 #退出循环
             show()                                    #显示全部学生信息
             inputMark = input("是否继续删除?(y/n):")
             if inputMark == "y":
                  mark = True                          #继续删除
             else:
                 mark = False                          #退出删除学生信息功能
  •         In the above code, the show() function is called to display student information, which will be introduced in section 1.6.4.

1.5.4 Realize the function of modifying student information

1. Function overview

        The function of modifying student information is mainly to find the corresponding student information from the disk file according to the student ID entered by the user on the console, and then modify it. For example, input the function number "4" on the function menu and press the <Enter> key, the system first displays a list of all student information, and then prompts to enter the student number to be modified. After entering the corresponding student ID, the system will look up the student information in the file. If found, it will prompt to modify the corresponding information, otherwise it will not be modified. Finally, it is prompted whether to continue to modify, as shown in the figure. Enter "y", the system will prompt the user again to enter the student number to be modified, and enter "n" to exit the modification function.

2. Business Process

        When realizing the function of modifying student information, we must first sort out its business process and implementation technology. as the picture shows.

3. Concrete realization

        Write the function modify() called in the main function to modify student information. In this function, call the show() function to display all student information, and then determine whether the file that saves the student information exists. If it exists, open the file in read-only mode, read all student information and save it to the list, otherwise return. Next, the user is prompted to enter the student ID to be modified, and the file is opened in write-only mode. After opening the file, traverse the list of saved student information, convert each element into a dictionary, and then judge whether it is the information to be modified according to the input student ID. If it is the information to be modified, the user is prompted to enter the new information and save it to the file, otherwise it is directly written to the file. The specific code of modify() function is as follows:

def modify():
    show()                                   #显示全部学生信息
    if os.path.exists(filename):             #判断文件是否存在
        with open(filename,'r') as rfile:    #打开文件
            student_old = rfile.readlines()
    else:
        return
    studentid = input("请输入要修改的学生ID:")
    with open(filename,"w") as wfile:        #以只写模式打开文件
        for student in student_old:
            d = dict(eval(student))          #字符串转字典
            if d["id"] == studentid:         #是否为要修改的学生
               print("找到了这名学生,可以修改他的信息!")
               while True:                  #输入要修改的信息
                    try:
                        d["name"] = input("请输入姓名:")
                        d["english"] = int(input("请输入英语成绩:"))
                        d["python"] = int(input("请输入Python语言:"))
                        d["c"] = int(input("请输入C语言:"))
                    except:
                        print("您的输入有误,请重新输入。")
                    else:
                        break                #跳出循环
               student = str(d)              #将字典转换为字符串
               wfile.write(studnet + "\n")   #将修改的信息写入到文件
               print("修改成功!")
            else:
               wfile.write(student)          #将未修改的信息写入到文件
    mark = input("是否继续修改其他学生信息?(y/n):")
    if mark == "y":
        modify()                             #重新执行修改操作

 

1.6 Query/Statistics Module Design

1.6.1 Overview of Query/Statistics Module

        In the student information management system, the query/statistics module is used to query and count student information. It mainly includes searching student information based on student number or name, counting the total number of students, and displaying all student information. When displaying the obtained student information, the total score is automatically calculated. Among them, when the user enters the number "2" in the function selection interface or uses the arrow keys to select the "2 Find Student Information" menu item, the function of finding student information can be entered. Here you can find student information based on student number or name, and the running effect is shown in the figure.

        When the user enters the number "6" in the function selection interface (or use the arrow keys to select the menu item "6 Count the total number of students"), you can enter the function of counting the total number of students. Here you can realize statistics and display the information of the total number of students.

        When the user enters the number "7" in the function selection interface (or uses the arrow keys to select the menu item "7 Show all student information"), the user can enter the function of displaying all student information. Here you can display all student information (including the student's total score), and the running effect is shown in the figure.

1.6.2 Realize the function of finding student information

1. Function overview

        The function of finding student information is to find the corresponding student information in the disk file according to the user's input of student ID or name on the console. For example, enter the function number "2" on the function menu and press the <Enter> key, the system will ask the user to choose whether to query by student number or by student name, if the user enters "1", the user is required to enter the student ID , Means to search by student ID. Then enter the student ID you want to query, the system will search for the student's information, and if found, it will be displayed, as shown in the figure. Otherwise, "No data information" is displayed. Finally, if it prompts whether to continue searching and input “y”, the system will prompt the user again to select the searching method, and input “n” to exit the function of searching student information.

2. Business Process

        When realizing the function of querying student information, we must first sort out its business process and implementation technology. According to the function to be realized, design the business process and realization technology as shown in the figure.

3. Concrete realization

        Write the function search() called in the main function to find student information, set up a loop and first judge whether the file storing the student information exists in the loop, if it does not exist, give a prompt and return, otherwise prompt the user to select the query method; Then find the corresponding student information in the file that saves the student information according to the selected method, and call the show_student() function to display the query result. The specific code of the search() function is as follows:

def search():
    mark = True
    student_query = []                              #保存查询结果的学生列表
    while mark:
         id = ""
         name = ""
         if os.path.exists(filename):               #判断文件是否存在
             mode = input("按ID查输入1;按姓名查输入2:")
             if mode == "1":
                  id = input("请输入学生ID:")       #按学生编号查询
             elif mode == "2":
                  name = input("请输入学生姓名:")   #按学生姓名查询
             else:
                  print("您的输入有误,请重新输入!")
                  search()                        #重新查询
             with open(filename,'r')as file:        #打开文件
                  student = file.readlines()        #读取全部内容
                  for list in student:
                      d = dict(eval(list))          #字符串转字典
                      if id is not "":              #判断是否按ID查询
                          if d['id'] == id:
                              student_query.append(d) #将找到的学生信息保存到列表中
                      elif name is not "":            #判断是否按姓名查询
                          if d['name'] == name:
                              student_query.append(d)
                  show_student(student_query)         #显示查询结果
                  student_query.clear()               #清空列表
                  inputMark = input("是否继续查询?(y/n):") 
                  if inputMark == "y":
                       mark = True
                  else:
                       mark = False
        else:
            print("暂未保存数据信息...")
            return 

        In the above code, the function show_student() is called to display the obtained list in the specified format. The specific code of the show_student() function is as follows:

#将保存的列表中的学生信息显示出来
def show_student(studentlist):
    if not studentlist:
         print("无数据信息\n")
         return
    #定义标题显示格式
    format_title = "{:^6}{:^12}\t{:^8}\t{:^10}\t{:^10}\t{:^10}"
    print(format_title.format("ID","名字",
                   "英语成绩","Python成绩","C语言成绩","总成绩"))#按指定格式显示标题
    #定义具体内容显示格式
    format_data = "{:^6}{:^12}\t{:^12}\t{:^12}\t{:^12}\t{:^12}"
    for info in studentList:    #通过for循环将列表中的数据全部显示出来
        print(format_data.format(info.get("id"),
              info.get("name"),str(info.get("english")),str(info.get("python")),
              str(info.get("c")),
              str(info.get("english")+info.get("python")+
              info.get("c")).center(12)))

        In the above code, the string format () method is used to format it. When specifying the display format of the string, the number indicates the width, the symbol "^" indicates the center display, and "\t" indicates the addition of a tab character.

1.6.3 Realize the function of counting the total number of students

1. Function overview

        The function of counting the total number of students is mainly to count the number of student information saved in the student information file. For example, select "6 Count the number of students" on the function menu and press the <Enter> key, the system will automatically count and display the total number of students.

2. Business Process

        When realizing the function of counting the total number of students, we must first sort out its business process and implementation technology, as shown in the figure.

3. Concrete realization

        Write the function show() called in the main function to count the total number of students. In this function, add an if statement to determine whether the file saved to the student information exists, if it exists, open the file in read-only mode, read all the contents of the file and save it in a list. Then traverse the list, convert its elements into a dictionary, and add it to a new list. Finally, call the show_student() function to display the information in the new list. The specific code of the show() function is as follows:

def show():
    student_new = []
    if os.path.exists(filename):                 #判断文件是否存在
       with open(filename,'r') as rfile:         #打开文件
            student_old = rfile.readlines()      #读取全部内容
       for list in student_old:
            studdent_new.append(eval(list))      #将找到的学生信息保存到列表中
       if student_new:
            show_student(student_new)
    else:
       print("暂存保存数据信息...")

1.6.4 Realize the function of displaying all student information

1. Function overview

        The function of displaying all student information is mainly to obtain and display all the student information saved in the student information file. For example, select the menu item "7 Display all student information" on the function menu and press the <Enter> key, the system will obtain and display all student information.

2. Business Process

        When realizing the function of displaying all student information, we must first sort out its business process and implementation technology, as shown in the figure.

3. Concrete realization

        Write the function show() called in the main function to count the total number of students. In this function, add an if statement to determine whether the file that saves student information exists, if it exists, open the file in read-only mode, read the entire content of the file and save it in a list. Then iterate through the list, convert its elements into a dictionary, and add it to a new list, and finally call the show_student() function to display the information in the new list. The specific code of the show() function is as follows:

def show():
    student_new = [] 
    if os.path.exists(filename):             #判断文件是否存在
         with open(filename,'r') as rfile:   #打开文件 
             student_old = rfile.readlines() #读取全部内容
         for list in student_old:
             student _new.append(eval(list)) #将找到的学生信息保存到列表中
         if student_new:
             show_student(student _new)
   else:
       print("暂未保存数据信息...")
  •  The above code calls the show_student() function to display student information on the console. The show_student() function has been created in section 1.6.2.

1.7 

1.7.1 Overview of Sorting Module

In the student information management system, the sorting module is used to sort student information by grade. It mainly includes English score, Python score, C language score and total score in ascending or descending order. Among them, when the user enters the number "5" in the function selection interface, or uses the arrow keys to select the "5 sort" menu item, the sort function can be entered. Here, the student information is displayed in the input order (not sorted), and then the user is required to select the sorting method, and the display is sorted according to the selection method.

1.7.2 Achieve sorting by student performance

1. Function overview

        The function of sorting by student grades is to sort student information in ascending or descending order of English grades, Python grades, C language grades or total grades. For example, input the function number "5" and press the <Enter> key, the system will first display all student information not sorted. Then it is prompted to select the sorting method by programming language (input "2" here), and then select descending sort (input 1), the student information will be sorted and displayed in descending order of Python scores.

2. Business Process

        When implementing the function of sorting by student's grades, we must first sort out its business process and implementation technology, as shown in the following figure.

3. Concrete realization

        Write the sort function sort() called in the main function. In this function, first determine whether the file that saves the student information exists, if it exists, open the file to read all student information, convert each student information into a dictionary and save it in a new list, and then get user input According to the selection result, the sorting method is performed accordingly, and finally the show_student() function is called to display the sorting result. The specific code of the sort() function is as follows:

def sort():
    show()
    if os.path.exists(filename):
         with open(filename,'r') as file:
             student_old = file.readlines()
             student_new = []
         for list in student_old:
             d = dict(eval(list))             #字符串转字典
             student_new.append(d)            #将转换后的字典添加到列表中
    else:
        return
    ascORdesc = input("请选择(0升序;1降序):")
    if ascORdesc == "0":                      #按升序排序
         ascORdescBool = False
    elif ascORdesc == "1":
         ascORdescBool = True                 #按降序排序
    else:
         print()
         sort()
    mode = input()
    if mode == "1":                           #按英语成绩排序
         student_new.sort(key=lambda x: x["english"],reverse=ascORdescBool)
    elif mode == "2":                         #按Python成绩排序
         student_new.sort(key=lambda x: x["python"],reverse=ascORdescBool)
    elif mode == "3":                         #按C语言成绩排序
         student_new.sort(key=lambda x: x["c"],reverse=ascORdescBool)
    elif mode == "0":                         #按总成绩排序
         student_new.sort(key=lambda x: x["english"]+x["python"]+x["c"],reverse=ascORdescBool)
    else:
         print(“您的输入有误,请重新输入!”)
         sort()
    show_student(student_new)                 #显示排序结果

In the above code, the sorting achieved by calling the sort() method of the list is sorted by the sorting rule specified by the lambda expression. For example, "key=lambda x: x["english"]" in line 22 of the code means sorting according to the english key of the dictionary; "reverse = ascORdescBool" means whether it is sorting in descending order, and the value of the mark variable ascORdescBool is True, which means Sort in descending order.

1.8 Packaged as an .exe executable file

        After the Python project is completed, it can be packaged into an .exe executable file, so that the project can be run on other computers, even if the Python development environment is not installed on this computer.

        To package the .exe executable file, you need to use the PyInstaller module, which is a third-party module and needs to be installed separately. The PyInstaller module supports multiple operating systems, such as Windows, Linux, Mac OS X, etc., but the module does not support cross-platform operations. For example: the .exe executable file packaged under the Windows operating system, the file can only be run under the Windows environment.

        Here takes the Windows operating system as an example to introduce the installation of the PyInstaller module. The easiest way to install the PyInstaller module is to enter the "pip install pyinstaller" command in the "Command Prompt Window" to install, as shown in the figure. If it is an upgrade or update, you can use the "pip install --upgrade pyinstaller" command.

  • In the Windows operating system, PyWin32 will be installed automatically when the PyInstaller module is installed using pip or easy_install.
  • After the PyInstaller module is installed, you can enter the "pyinstaller--version" command in the "Command Prompt Window" to check whether the installation is successful by querying the PyInstaller module version.

After the PyInstaller module is installed, you can package the .py file as an .exe file. The specific method is as follows.

(1) Open the "Command Prompt" window through the CMD command, and enter at the current cursor position: pyinstaller+-F+ (the absolute path of the .py file to be packaged), for example, if the file is saved in the "" directory, you can use the following The code to package it:

                       pyinstaller  -F  E:\tmp\studentsystem\studentsystem.py

  • In the above code, the parameter -F means that only one executable file with the extension .exe is generated.

(2) Enter the above code and press the <Enter> key, the .exe executable file will be automatically generated, the specific process is shown in the figure.

(3) In the location shown in the figure, find the save path of the .exe file, and find the generated .exe executable file under this path, double-click the file to run this project.

  • In the introduced PyInstaller module packaging program, you cannot package the images, text files, audio, video and other resources used in the project into executable files. Therefore, these resources need to be copied to the same directory as the executable file after packaging. 

1.9 Summary

        This section mainly uses Python language to develop a student information management system. The core of the project is to operate on files, lists and dictionaries. Among them, the operation of the file is used to permanently save the student information; and the storage of the student information in the list in the form of a dictionary is to facilitate the search, modification and deletion of the student information. Through the study of this section, readers should first be proficient and master the methods of creating, opening and modifying files, and secondly they should also master the methods of operating dictionaries and lists, especially the custom sorting rules for lists. The difficulties of this project require readers to carefully understand and understand.

Guess you like

Origin blog.csdn.net/weixin_38452841/article/details/108480075