1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| class SoftwareEngineer: def __init__(self, experience_years): self.experience_years = experience_years self.title = "架构师"
def expertise(self, skills): self.skills = skills
def hobbies(self, interests): self.interests = interests
def set_goals(self, goals): self.goals = goals
def set_motto(self, motto): self.motto = motto
def introduction(self): intro = ( f"您好,我是一名拥有近{self.experience_years}年的{self.title}和软件工程师。" f"我熟练掌握敏捷开发流程和DevOps,致力于设计创新解决方案。" f"业余时间,我喜欢关注时事新闻、阅读技术博客," f"并通过跑步和游泳来保持活力。" f"\n\n2023年的目标:" ) for goal in self.goals: intro += f"\n- {goal}" intro += f"\n\n口号:{self.motto}" return intro
me = SoftwareEngineer(experience_years=20) me.expertise(["架构设计", "敏捷开发", "DevOps"]) me.hobbies(["时事新闻", "技术博客", "跑步", "游泳"]) me.set_goals([ "阅读4本非技术书籍,修身养性", "重新维护技术博客", "学习区块链和生成式AI技术", "坚持跑步", "努力工作" ]) me.set_motto("主动创造幸福")
print(me.introduction())
|
您好,我是一名拥有近20年的架构师和软件工程师。我熟练掌握敏捷开发流程和DevOps,致力于设计创新解决方案。业余时间,我喜欢关注时事新闻、阅读技术博客,并通过跑步和游泳来保持活力。
2023年的目标:
- 阅读4本非技术书籍,修身养性
- 重新维护技术博客
- 学习区块链和生成式AI技术
- 坚持跑步
- 努力工作
主动创造幸福