- 博客(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关注的人