自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 studententity.py.jpeg

from StudentEntity import Student def 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:22:24 84

原创 StudentEntity.py

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.co.

2021-12-20 09:21:24 172

原创 main.py.jpeg

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

2021-12-20 09:20:11 81

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

# 输出程序功能菜单 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-02 10:27:55 89

原创 Python 九九乘法表

n=int(input()) i=1 while i <= 9: j=1 while j <= i: print("%d*%d=%d"%(j,i,j*i),end = "\t") j +=1 print("") i += 1

2021-10-29 11:18:27 47

原创 Python账号密码登录

flag = 0 for i in range(3): username = input("请输入用户名:") password = input("请输入密码:") if username == "Weihai" and password == "123456": print("登陆成功") flag = 1 break else: print("用户名或密码错误!") if flag == 0: pr.

2021-10-29 11:17:54 2287

原创 Python实现猜数字游戏

import random n = random.randint(1,101) cnt = 0 while True: # 回答 ans = int(input("请输入一个数字:")) cnt += 1 # 判断 if ans == n: print("猜对了,你一共猜了%d次" % cnt) break elif ans > n: print ("大了") else : pri.

2021-10-26 08:24:59 1042

空空如也

空空如也

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

TA关注的人

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