用Python写出下面框架的代码 框架名:(教师-1)) 姓名:夏冰 年龄:36 性别:女 职称:副教授 部门:计算机系软件教研室 住址:<adr-1> 工资:<sal-1<> 开始工作时间:1988, 截止时间:1996,7
时间: 2024-09-13 13:07:14 浏览: 39
1-新日本无线-夏冰-最新光电传感器可穿戴应用及整合方案-综合文档
以下是一个简单的Python类实现,描述了您提供的教师信息框架:
```python
class Teacher:
def __init__(self, name, age, gender, title, department, address, salary, start_year, end_year):
self.name = name
self.age = age
self.gender = gender
self.title = title
self.department = department
self.address = address
self.salary = salary
self.start_year = start_year
self.end_year = end_year
# 创建一个教师对象
teacher = Teacher(
name="夏冰",
age=36,
gender="女",
title="副教授",
department="计算机系软件教研室",
address="<adr-1>",
salary="<sal-1>",
start_year=1988,
end_year=1996
)
# 打印教师信息
print(f"姓名: {teacher.name}")
print(f"年龄: {teacher.age}")
print(f"性别: {teacher.gender}")
print(f"职称: {teacher.title}")
print(f"部门: {teacher.department}")
print(f"住址: {teacher.address}")
print(f"工资: {teacher.salary}")
print(f"开始工作时间: {teacher.start_year}")
print(f"截止时间: {teacher.end_year}")
```
阅读全文