学生管理系统

#Student Management System
def systemMenu():
print('-'*30)
print('Student Management System V1.0')
print('1、Add student information')
print('2、Delete student information')
print('3、Update student information')
print('4、Query student information')
print('5、Student information list')
print('6、Exit system')
print('-'*30)


def studentAdd(studentListParams):
studentInfo = {}
studentInfo['name'] = input('Please enter the name:')
studentInfo['sid'] = input('Please enter the school number:')
studentListParams.append(studentInfo)


def studentDelete(studentListParams):
delID = int(input('Please enter the index to delete:'))
del studentListParams[delID]


studentList = []
while True:

systemMenu()
key = int(input('Please select the number:'))

if key == 1:
studentAdd(studentList)
elif key == 2:
studentDelete(studentList)
elif key == 3:
pass
elif key == 4:
pass
elif key == 5:
print('*'*20)
print('Student information list')
print('ID   Name')
for student in studentList:
print('%s  %s'%(student['sid'],student['name']))
elif key == 6:
quit = input('Determine the exit system?yes or no.')
if quit == 'yes':
break
else:
print('input error')
学生管理系统