用户:
文本文档txt查看:0 回复:0 评论:0 创建时间:2021-05-17T19:06:09
【作品展示】

【作品介绍】
可以用来挖坟请各位大佬做一些更高级的挖坟
【作品源代码】
class Post():
def __init__(self,year,ty_pe):
self.year=year
self.ty_pe=ty_pe
def output_judgment(self):
if self.year<2020 or self.ty_pe=='官方精贴':
print('这个'+str(self.year)+"年的"+self.ty_pe+'适宜挖坟')
else:
print('这个'+str(self.year)+"年的"+self.ty_pe+'不适宜挖坟')
T=Post(2018,'水贴')
class Luoyang_shovel():
def __init__(self,Effect):
self.Effect=Effect
def dig_grave(self):
if self.Effect == '挖坟':
if T.year < 2020 or T.ty_pe == '官方精贴':
print('洛阳铲,挖!')
L=[Luoyang_shovel('铲土'),Luoyang_shovel('挖坟')]
T.output_judgment()
for i in L:
i.dig_grave()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn