
python2-lesson14
Quiz
•
Computers
•
3rd - 12th Grade
•
Practice Problem
•
Medium
hang zheng
Used 19+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
已知存在一个类Animal,现在想创建一个新类Bird类同时要继承Animal类,下列代码格式正确的是?
def Animal(BIrd):
def Bird(Animal):
class Animal(Bird):
class Bird(Animal):
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
观察上图中的代码,谁是父类,谁是子类?
Animal是父类,Dog是子类
Dog是父类,Animal是子类
两个都是父类
两个类毫无关联,没有父类子类的区分
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
观察上述代码,请问创建的实例d中有几个属性?
1
2
3
4
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
super().__init__()中的super()表示什么?
父类
子类
父类的__init__()方法
子类的__init__()方法
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
运行上述代码,程序会产生什么结果?
程序报错
输出1
程序运行正常,但什么都不输出
输出None
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Animal类中有一个run方法,现在有一个Dog类的实例d,Dog类中并没有run方法,请问d可以运行run方法吗?
一定可以,因为Animal中有run()方法
不一定,因为无法确定Dog类是否继承了Animal类
一定不可以,因为Dog类中没有run方法
一定可以,Dog类自带一个run()方法
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
观察上述代码,如果想让实例d执行run()方法,下列代码正确的是?
Animal.run()
Dog.run()
d.run()
run()
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
六年级TMK 单元3 编程与测试
Quiz
•
6th Grade
8 questions
4 年级 RBT - Scratch
Quiz
•
1st - 12th Grade
10 questions
电脑与网络安全
Quiz
•
11th Grade
12 questions
Hello World!
Quiz
•
1st - 3rd Grade
15 questions
109 第二學期 資訊科技 3-1 (2)
Quiz
•
7th Grade
15 questions
极客争霸赛-第四回合
Quiz
•
10th Grade
12 questions
Python_基礎觀念
Quiz
•
9th Grade
10 questions
Scratch 交換
Quiz
•
8th Grade
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
40 questions
Introduction to Microsoft Word
Quiz
•
8th - 12th Grade
85 questions
Word Processing Review
Quiz
•
8th - 9th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
39 questions
UNIT 7 and UNIT 8 — Multiple Choice Question Bank (Extracted)
Quiz
•
9th Grade
30 questions
Google Sheets Quiz
Quiz
•
5th - 7th Grade
15 questions
Google Docs
Lesson
•
5th - 7th Grade
31 questions
Python Conditionals Review
Quiz
•
9th - 12th Grade
