Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-16-3_quiz
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
637eb1ee
authored
Mar 12, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parents
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
quiz2.py
quiz2.py
0 → 100644
View file @
637eb1ee
# 勇于挑战的创造师们,请补充初始化方法的代码,确保后面两行的代码能够顺利执行,打印出小狗名字`芋头`。
class
Pet
:
def
__init__
?
# 定义初始化方法,有四个属性
# 每只动物的基本属性为:类别(kind)、品种(breed)、姓名(name)、年龄(age)
dog
=
Pet
(
'狗'
,
'柯基'
,
'芋头'
,
'3岁'
)
print
(
?
)
# 打印出实例属性name
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment