粉丝:{{bookData.followerCount}}
{{!bookData.isSubscribed?'关注':'取消关注'}}
动物旅馆设计文档 汪子涵1. 应该设计哪些类?哺乳动物类 鸟类 爬行动物类 两栖动物类 鱼类 房间类class BuruAnimal: def __init__(self, size): self.size = size @staticmethod def felling(): print("hahaha")class Bird: def __init__(self, size): self.size = size @staticmethod def felling(): print("jiujiujiu")class PaxingAnimal: def __init__(self, size): self.size = size @staticmethod def felling(): print("xixixi")class Fish: def __init__(self, size): self.size = size @staticmethod def felling(): print("gulugulu&q... [收起]
[展开]
{{!bookData.isSubscribed?'关注':'已关注'}}
粉丝: {{bookData.followerCount}}
文本内容
第1页
动物旅馆设计文档 汪子涵
1. 应该设计哪些类?哺乳动物类 鸟类 爬行动物类 两栖动物类 鱼类 房间类
class BuruAnimal:
def __init__(self, size):
self.size = size
@staticmethod
def felling():
print("hahaha")
class Bird:
def __init__(self, size):
self.size = size
@staticmethod
def felling():
print("jiujiujiu")
class PaxingAnimal:
def __init__(self, size):
self.size = size
@staticmethod
def felling():
print("xixixi")
class Fish:
def __init__(self, size):
self.size = size
@staticmethod
def felling():
print("gulugulu")
class LiangqiAnimal:
def __init__(self, size):
self.size = size
@staticmethod
第2页
def felling():
print("guaguagua")
2. 用 list a 储存
3. 先生成再遍历 如果有相同的密码则重新生成一个再进行上一步
并将密码输出
4. 用房间类 empty 储存 1 空闲 0 为有人
第3页
5.
6. 假设尺寸为 3*2*1 的哺乳类动物要入住
酒店房间
结果:
百万用户使用云展网进行线上电子书制作,只要您有文档,即可一键上传,自动生成链接和二维码(独立电子书),支持分享到微信和网站!
更多案例
百万用户使用云展网进行线上电子书制作,只要您有文档,即可一键上传,自动生成链接和二维码(独立电子书),支持分享到微信和网站!
{e.stopPropagation()}">
x
{{toast}}