自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 将学生信息保存到students.txt的文件中

from StudentEntity import Studentdef loadStudents(): file=open("student.txt","r",encoding="utf-8") lines=file.readlines() students=[] for line in lines: a=line.split(',') students.append(Student(a[0],a[1],int(a[2]),a[3].st.

2021-12-20 09:16:42 1943

原创 学生类:学号,姓名,年龄,手机号

class Student: def __init__(self,no,name,age,contact): self.no=no self.name=name self.age=age self.contact=contact def __str__(self): return "{},{},{},{}".format(self.no,self.name,self.age,self.contact) .

2021-12-20 09:15:04 455

原创 学生通讯管理系统v1.0

import StudentEntityfrom DataAccess import *students = []def menu(): print('-'*40) print('欢迎使用学生通讯管理系统1.0') print('[1] 增加学员信息') print('[2] 删除学员信息') print('[3] 打印学员信息') print('[4] 退出系统') print('-'*40)def add(students): n.

2021-12-20 09:13:01 218

原创 2021-11-05

print('-' * 40)print("欢迎使用学生通讯管理系统v1.0")print("[1] 增加学员信息")print("[2] 删除学员信息")print("[3] 打印学员信息")print("[4] 退出系统")print('-' * 40)students = []while True: n = int(input("请选择功能编号[1 - 4]:")) if n == 1: code = input("请输入学员学号:") .

2021-11-05 08:31:11 87

原创 Python实现猜数字游戏

improt randomn=random.randint(1,101)cnt=0while True: #回答 ans=int(input("请输入一个数字:")) cnt+=1 #判断 if ans==n: print("猜对了,你一共猜了%d次"%cnt) break elif ans>n: print("大了") else: print("小了")列夫托尔斯泰·小钰,发明.

2021-10-22 10:06:26 999

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除