- 博客(7)
- 收藏
- 关注
原创 【无标题】学生信息管理系统升级版
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.
2021-12-20 11:24:39 291
原创 定义学生信息类
class Student(): def __init__(self, name, score): self.name = name self.score = score def print_grade(self): if self.score >= 90: print(f'学员姓名:{self.name},学员成绩:{self.score},优秀') elif self.score >=.
2021-11-06 13:51:56 129
原创 通讯录管理系统2.0
def menu(): print('-' * 40) print('通讯录管理系统V1.0') print('1、添加学员信息') print('2、删除学员信息') print('3、修改学员信息') print('4、查询学员信息') print('5、遍历所有学员信息') print('6、退出系统') print('-' * 40)info = []def add_student(): info_dict =.
2021-11-02 10:46:45 70
原创 学生通讯管理系统
print("-" * 40)print("欢迎使用学生通讯管理系统v1.0")print("[1] 增加学员信息")print("[2] 删除学员信息")print("[3] 打印学员信息")print("[4] 退出系统")print("-" * 40)students = []while True: n = print(input("请重新输入要操作的编号[1 ~ 4]:")) if n == 1: code = input("请输入学员学号:") .
2021-10-31 19:26:52 72
原创 猜数字游戏
import 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: prin.
2021-10-25 20:10:59 1540
原创 账户名密码锁定问题
flag = 0for i in range(3): username = input("请输入用户名: ") password = input("请输入密码: ") if username == "Weihai" and password == "123456": print("登陆成功") flag = 1 break else: print("用户名或密码错误!")if flag == 0: .
2021-10-22 11:23:40 106
原创 九九乘法表
n = int(input())# 行i = 1while i <= n: # 列 j = 1 while j <= i: print("%d * %d = %d" % (j, i, j * i), end = "\t") j += 1 print("") i += 1
2021-10-22 10:48:56 56
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人