学生管理系统 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. ...
随机推荐
- 【python-Django开发】Django 配置MySQL数据库讲解!!!
官方文档请阅读:https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-db-api-drivers 配置MySQL数据库 1. 新建M ...
- Find out "Who" and "Where"
Yesterday a friend of mine Kirby came to me with a smartphone and she wanted me to do her a favor. S ...
- 释放你的硬盘空间!——Windows 磁盘清理技巧
引言 用了Windows系统的各位都知道,作为系统盘的C盘的空间总是一天比一天少.就拿本人的例子来说,自从安装了Win10,就发现,C盘从一开始的10几G占用,到现在慢慢变成了20G.30G….占用只 ...
- DataOps系列丨数据的“资产负债表”与“现状”
作者:DataPipeline CEO 陈诚 <跨越鸿沟>的作者Geoffrey Moore曾说“没有数据,运营企业就像一个又聋又瞎的人在高速上开车一样”.数据的价值从未像现在这样被企业重 ...
- Apache ActiveMQ任意文件写入漏洞(CVE-2016-3088)复现
Apache ActiveMQ任意文件写入漏洞(CVE-2016-3088)复现 一.漏洞描述 该漏洞出现在fileserver应用中,漏洞原理:ActiveMQ中的fileserver服务允许用户通 ...
- 【原创】TextCNN原理详解(一)
最近一直在研究textCNN算法,准备写一个系列,每周更新一篇,大致包括以下内容: TextCNN基本原理和优劣势 TextCNN代码详解(附Github链接) TextCNN模型实践迭代经验总结 ...
- HTML/CSS:图片居中(水平居中和垂直居中)
css图片居中(水平居中和垂直居中) css图片居中分css图片水平居中和垂直居中两种情况,有时候还需要图片同时水平垂直居中, 下面分几种居中情况分别介绍: css图片水平居中 1.利用margin: ...
- 使用windows powershell ISE管理命令窗口,并集成git命令
写于2018-09-03(基于win10) 开启 win + s 输入 ise 操作 主要使用新建的power shell选项卡 将git集成到power shell中 安装准备 确定你的power ...
- redhat linux 5.3安装activeMQ
安装环境:linux redhat enterprise 5.3 activemq版本:5.9.01.从http://activemq.apache.org/download.html地址下载apac ...
- 利用DoHome APP和音箱控制继电器通断电实验参考步骤
准备材料: Arduino Uno 一块 Arduino 扩展板 购买链接 DT-06模块一个 购买链接 安卓手机一个 小度音箱一个 继电器模块一个 杜邦线若干 1.DT-0 ...