class Animal(object):
"""Makes cute animals."""
is_alive = True
def __init__(self, name, age):
self.name = name
self.age = age
# Add your method here!
def description(self):
print self.name
print self.age
hippo = Animal("Steve",100)
hippo.description()
--代码片段一
我得到的错误:
Traceback (most recent call last):
File "runner.py", line 125, in compilecode
File "python", line 3
is_alive = True
^
IndentationError: unexpected indent
不知道发生了什么
谁能告诉我我错在哪里?多谢!