class Dog():

	def __init__(self, name, age): # 注意两边是两个短横线
		self.name = name
		self.age = age

	def sit(self):
		print(self.name + " is now sitting.")

	def roll_over(self):
		print(self.name.title() + "is rolled now")


dog = Dog("xiaohu", 6)

dog.sit()
dog.roll_over()
dog.name = "ddd"
print(dog.name)

cad1f53da79fdad0663f1047b02b00535ec2f18c
class Dog:

    def __init__(self, name, age):
        self.name = name
        self.age = age
    <mask token>
    <mask token>


<mask token>

class Dog:

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def sit(self):
        print(self.name + ' is now sitting.')

    def roll_over(self):
        print(self.name.title() + 'is rolled now')


<mask token>

class Dog:

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def sit(self):
        print(self.name + ' is now sitting.')

    def roll_over(self):
        print(self.name.title() + 'is rolled now')


<mask token>
dog.sit()
dog.roll_over()
<mask token>
print(dog.name)

class Dog:

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def sit(self):
        print(self.name + ' is now sitting.')

    def roll_over(self):
        print(self.name.title() + 'is rolled now')


dog = Dog('xiaohu', 6)
dog.sit()
dog.roll_over()
dog.name = 'ddd'
print(dog.name)

class Dog():

	def __init__(self, name, age): # 注意两边是两个短横线
		self.name = name
		self.age = age

	def sit(self):
		print(self.name + " is now sitting.")

	def roll_over(self):
		print(self.name.title() + "is rolled now")


dog = Dog("xiaohu", 6)

dog.sit()
dog.roll_over()
dog.name = "ddd"
print(dog.name)
