学生管理系统

#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')
学生管理系统 - Stars - The future is in my
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值