class Dog(object):
typee="宠物"
def __init__(self,a,b,c):
self.name=a
self.age=b
self.color=c
def eat(self):
print(self.name,"在啃东西!")
def run(self,speed):
print(self.name,"在跑!速度为:",speed)
dog=Dog("小黑",3,"白色") #初始化赋值
'''print(dog.name)
print(dog.age)
print(dog.color)'''
'''dog.color="黑色"
print(dog.color)'''
dog.eat()
dog.run("3m/s")