Fundamentals 6 min read

Graduate Student Information Management System in Python (Console CRUD Application)

This article presents a Python console program that implements a graduate student information management system, providing basic CRUD operations such as viewing, adding, modifying, and deleting student records, and includes the full source code with menu-driven interaction.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Graduate Student Information Management System in Python (Console CRUD Application)

The article describes a simple graduate student information management system written in Python, designed to run in a console and demonstrate basic CRUD (Create, Read, Update, Delete) functionality for student records.

A text‑based menu guides the user to view the student list, add new students, modify existing entries, or delete records, with prompts for fields such as student ID, name, phone number, college, grade, employment status, and company.

def Menu():##菜单主界面
  print('*'*22)
  print("* 查看毕业生列表输入: 1 *")
  print("* 添加毕业生信息输入: 2 *")
  print("* 修改毕业生信息输入: 3 *")
  print("* 删除毕业生信息输入: 4 *")
  print("* 退出系统请输入   0 *")
  print('*'*22)

def CheckIdisRight(StudentList,id):##检查学号是否在列表中
  for i in range(0, len(StudentList)):
    if((id in StudentList[i])==True):
      return True
  return False

def PrintStudentList(StudentList):#打印学生信息列表
  for i in range(0, len(StudentList)):
    print(StudentList[i])

def AddStudent(StudentList):##添加学生信息
  number = int((input("请输入学号:")))
  if(number<1000000000 and CheckIdisRight(StudentList,number)==False):##学号判断
    print("学号输入错误&学号已存在!请重新输入:")
    number = (input("请输入学号:"))
  name = input("请输入你的名字:")
  tell = input("请输入你的电话:")
  if(len(tell)!=11):
    print("请输入正确的电话号码(11)位:")
    tell = input()
  college = input("请输入你的学院名称:")
  grade = input("请输入你的年级:")
  isjob = int(input("是否就业?:是填 1 否则填0: "))
  if(isjob == 1):
    company = input("请输入你公司的名称:")
  else:
    company = 0
  arry = [number, name, tell, college, grade, isjob, company]
  StudentList.append(arry)
  PrintStudentList(StudentList)

# ... (additional functions for modifying and deleting students) ...

def main():
  Menu()
  StudentInfo = ['学号','姓名','电话','学院','年级','是否就业','就业公司']
  StudentList = [StudentInfo]
  while(1):
    a = int(input("请输入:"))
    while(a):
      if(a==1):
        PrintStudentList(StudentList)
        Menu()
        break
      if(a==2):
        AddStudent(StudentList)
        Menu()
        break
      if(a==3):
        ChangeStudent(StudentList)
        Menu()
        break
      if(a==4):
        DeleteStudent(StudentList)
        Menu()
        break
    if (a == 0):
      exit()
main()

The program defines helper functions for checking IDs, printing the list, adding, modifying, and deleting student entries, and a main loop that repeatedly displays the menu, reads the user's choice, and invokes the appropriate operation.

At the end of the article the author shares screenshots of the main interface, lists the menu options (view, add, modify, delete), and reflects on the challenges encountered while writing the code, noting the need to rewrite parts after discovering issues.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Data ManagementconsoleStudent Management
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.