摘要:
name = 'Alex li' name2 = name print('My name is',name,name2) name = 'paoche Ge' print(name,name2) 阅读全文
摘要:
#coding:utf-8 class A: # def test(self): # print('A') pass class B(A): # def test(self): # print('B') pass class C(A): # def test(self): # print('C') ... 阅读全文
摘要:
class Vehicle: Country='China' def __init__(self,name,speed,load,power): self.name=name self.speed=speed self.load=load self.power=power def run(self): ... 阅读全文
摘要:
class Room: tag=1 def __init__(self,name,owner,width,length,heigh): self.name=name self.owner=owner self.width=width self.length=length self.heigh=heig... 阅读全文
摘要:
class School: x=1 def __init__(self,name,addr,type): self.Name=name self.Addr=addr self.Type=type def tell_info(self): print('学校的详细信息是:name:%s addr:%s' %(... 阅读全文
摘要:
class Room: tag=1 def __init__(self,name,owner,width,length,heigh): self.name=name self.owner=owner self.width=width self.length=length self.heigh=heig... 阅读全文
摘要:
class Room: tag=1 def __init__(self,name,owner,width,length,heigh): self.name=name self.owner=owner self.width=width self.length=length self.heigh=heig... 阅读全文
摘要:
import abc class All_file(metaclass=abc.ABCMeta): @abc.abstractmethod def read(self): pass @abc.abstractmethod def write(self): pass class Disk(All_file): def re... 阅读全文