摘要:
公鸡3元一只,母鸡2元一只,小鸡1元三只 100元100只 for x in range(1,33): for y in range(1,50): z = 100-x-y if (z%3 == 0) and (3x+2y+z/3=100): print(“公鸡:”%s,“母鸡:”%s,"小鸡:”%s 阅读全文
摘要:
多态:一种接口,多种实现class Animal: def __init__(self, name): # Constructor of the class self.name = name def talk(self): # Abstract method, defined by conventi 阅读全文