学生管理系统 Python语言
def show_student(): print(('*'*20).center(55)) print('1.添加学生信息'.center(50)) print('2.修改学生信息'.center(50)) print('3.删除学生信息'.center(50)) print('4.查询学生信息'.center(50)) print('5.退出信息系统'.center(50)) print('6.显示学生信息'.center(50)) print(('*'*20).center(55)) def add_student(): a_name = input('please input the student name : ') a_sex = input('please input the the sex :') a_height = input('please input the height:') add_diclt = {'name':a_name ,'sex':a_sex ,'height':a_height} sum_list.append(add_diclt) return sum_listdef alter_student(): al1 = 0 alte = input('please input the alter the student message name :') for al in range(len(sum_list)): if sum_list[al]['name'] == alte : print(sum_list[al]) al1 = al else: if al == len(sum_list)-1: print('do not find the student name ') exit() continue a_name = input('please input the student name : ') a_sex = input('please input the the sex :') a_height = input('please input the height:') add_diclt = {'name':a_name ,'sex':a_sex ,'height':a_height} sum_list.insert(al1,add_diclt) sum_list.pop(al1+1) return sum_listdef del_student(): dll = 0 de_name = input('please input the del the student message name :') for dl in range(len(sum_list)): if sum_list[dl]['name'] == de_name: print(sum_list[dl]) dll = dl else: if dl == len(sum_list)-1: print('do not exit') exit() continue sum_list.pop(dll) print('删除成功!') return sum_listdef find_student(): find_name = input('please input the find the student message name :') for f1 in range(len(sum_list)): if sum_list[f1]['name'] == find_name: print(sum_list[f1]) else: if f1 == len(sum_list)-1: print('not find your input the name .please input continue') find_student() continue return sum_list def main_student(): while 1: show_student() s1 = input('please input the number:') if s1 == '1': print(add_student()) if s1 == '2': print(alter_student()) if s1 == '3': del_student() if s1 == '4': find_student() if s1 == '5': print('是否退出,如果退出输入Y,如果继续,输入N ') e1 = input('<<<') if e1.upper() == 'Y': exit() else: show_student() if s1 == '6': print(sum_list) sum_list = [] #总列表lis1 = ['deng','123','taibai','123456','alex','2019','Jing','2017']lis2 = []i = 3while i > 0: username = input('please input the username :') password = input('please input the password : ') if username in lis1[0::2] and password in lis1[1::2] : print('验证成功...') lis2.append(username) lis2.append(password) break else: i -= 1 print('验证失败,请再次尝试,您还有'+str(i)+'次机会') continueif i == 0: exit()print('欢迎{name}进入学生管理系统'.format(name = lis2[0]))main_student()
学生管理系统 Python语言的更多相关文章
- Python连接SqlServer+GUI嵌入式——学生管理系统1.0
学生管理系统1.0 1.建学生数据库 2.数据库嵌入高级语言(Python) 3.界面设计 简化思路: 1.先通过SqlServer2012建立学生数据库,包括账号.密码,姓名.选课等信息 2.运用P ...
- python学生管理系统
import osimport re #获取本机用户名,构建student.txt文件名创建在左面import getpassusername=getpass.getuser()print(" ...
- 学生管理系统-火车订票系统 c语言课程设计
概要: C 语言课程设计一---学生管理系统 使使用 C 语言实现学生管理系统.系统实现对学生的基本信息和考试成绩的 管理.采用终端命令界面,作为系统的输入输出界面.采用文件作为信息存储介质. 功能描 ...
- #006 C语言大作业学生管理系统第三天
还差最后两部分 读取文件 恢复删除的学生信息 先学会处理文件的 知识点,再继续跟着视频做这个作业. 应该明天周六能把视频里手把手教的学生管理系统敲完 第二周尽量自己能完成C语言课本最后面那道学生管理系 ...
- python开发的学生管理系统
python开发的学生管理系统(基础版) #定义一个函数,显示可以使用的功能列表给用户 def showInfo(): print("-"*30) print(" 学生管 ...
- 用python实现简易学生管理系统
以前用C++和Java写过学生管理系统,也想用Python试试,果然“人生苦短,我用Python”.用Python写的更加简洁,实现雏形也就不到100行代码. 下面上代码 #!/usr/bin/pyt ...
- c语言之学生管理系统
0x00 学生管理系统 说到学生管理系统,对于每一个初学c语言的人都是一道不得不过的砍.不过,学习c,我觉得每个人都应该写一个学生管理系统,至于为什么,我想倘若连一个学生管理系统都写不好,哪么他的c是 ...
- 如何用python做出老师看了都给满分的GUI学生管理系统毕设
序 言 哈喽大家好鸭!我是小熊猫 最近有什么有趣的事情发生吗?快来说给我听听( •̀ ω •́ )✧表弟大学快毕业了,学了一个学期Python居然还不会写学生管理系统,真的给我丢脸啊,教他又不肯学,还 ...
- 学生管理系统(C语言简单实现)
仅供借鉴.仅供借鉴.仅供借鉴(整理了一下大一C语言每个章节的练习题.没得题目.只有程序了) 文章目录 1 .实训名称 2.实训目的及要求 3. 源码 4.实验小结 1 .实训名称 实训12:文件 2. ...
随机推荐
- C++判断图像中一点是否在矩形中
需要判断出四条之间组成的矩形的范围,其中矩形的边缘可能是倾斜不平行于x或者y轴. 考虑和很久,参考博客http://blog.csdn.net/dapengbusi/article/details/5 ...
- python-crud
Python Fast CRUD https://github.com/aleimu/python-crud 目的 本项目采用了一系列Python中比较流行的组件,可以以本项目为基础快速搭建Restf ...
- 【SVN】eclipse 安装 SVN 插件
链接:eclipse中svn插件的安装 SVN 插件地址:http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=8EB28B11 ...
- Oracle DBLink跨数据库访问SQL server数据同步 踩坑实录
项目需求:这里暂且叫A公司吧,A公司有一套人事管理软件,需要与我们公司的软件做人员信息同步,A公司用的是SQL server数据库,我们公司用的Oracle,接口都不会开发(一万句"fuck ...
- memcached.c 源码分析
上文分析了memcached的autoconf过程以及configure, make过程,可以看到,memcached可执行文件是由memcached-memcached.o以及其他文件连接后编译出来 ...
- js获得页面get跳转的参数
通过js获得页面跳转参数 页面通过window.location.href或通过window.parent.location.href进行页面跳转,在新的页面如何获得相应的参数呢? window.lo ...
- 基于python的Elasticsearch索引的建立和数据的上传
这是我的第一篇博客,还请大家多多指点 Thanks ♪(・ω・)ノ 今天我想讲一讲关于Elasticsearch的索引建立,当然提前是你已经安装部署好Elasticsearch. ok ...
- Idea搭建Spring+SpringMvc+Mybatis框架集成项目
1.新建maven项目 2.创建多模块 每个模块配置如父模块一样,除视图层 (视图层配置) 最后 common-通过模块,不依赖任何模块,有各种项目所需要用到的工具类 model- POJO.VO.D ...
- 2.PHP利用PDO连接方式连接mysql数据库
代码如下 <?php$serverName = "这里填IP地址";$dbName = "这里填数据库名";$userName = "这里填用户 ...
- Python基础总结之初步认识---class类的继承(下)。第十五天开始(新手可相互督促
年薪百万的步伐慢了两天hhhh严格意义是三天.最近买了新的玩具,在家玩玩玩!~~~~ 今天开始正式认识类的继承.类的继承是怎么继承呢?看下代码: class Animal(object): #父类 d ...