摘要:
1 #include 2 3 void PrintNum1(int n); 4 void PrintNum2(int n); 5 void ShowNum(int n, void (* ptr)(int)); 6 7 void PrintMessage1(); 8 void PrintMessage2(); 9 void PrintMessage3... 阅读全文
摘要:
1 class LeiFeng(object): 2 3 def Sweep(self): 4 print("扫地") 5 6 def Wash(self): 7 print("洗衣") 8 9 def BuyRice(self): 10 print("买米") 11 12 13 class IF... 阅读全文
摘要:
1 class Operation(): 2 3 def __init__(self, NumberA=0, NumberB=0): 4 self.NumberA = NumberA 5 self.NumberB = NumberB 6 7 def GetResult(self): 8 pass 9 10 ... 阅读全文
摘要:
1 class Singleton(object): 2 3 def __new__(cls, *args, **kwargs): 4 if not hasattr(cls, '_the_instance'): 5 cls._the_instance = object.__new__(cls, *args, **kwargs) 6 ... 阅读全文