摘要: import numpy as np import matplotlib.pyplot as plt # 设置中文字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 设置中文字体为SimHei plt.rcParams['axes.unicode_mi 阅读全文
posted @ 2024-05-24 22:55 The-rich 阅读(18) 评论(0) 推荐(0)
摘要: 进行python实验:定义一个人员类People,其属性有:姓名、性别、年龄;基于People实现学生类Student,添加属性:学号、入学时间和入学成绩;基于People实现教师类Teacher,添加属性:职务、部门、工作时间;基于Student实现究生类Graduate,添加属性:研究方向和导师 阅读全文
posted @ 2024-05-24 22:55 The-rich 阅读(23) 评论(0) 推荐(0)
摘要: import numpy as np import matplotlib.pyplot as plt # 生成x的取值范围 x = np.linspace(0, 10, 100) # 计算y1、y2和y3的值 y1 = x * x y2 = np.cos(2 * x) y3 = y2 * y1 # 阅读全文
posted @ 2024-05-24 01:05 The-rich 阅读(16) 评论(0) 推荐(0)