
python2-lesson14

Quiz
•
Computers
•
3rd - 12th Grade
•
Medium

hang zheng
Used 19+ times
FREE Resource
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
Similar Resources on Wayground
11 questions
資訊測驗-高年級

Quiz
•
10th - 12th Grade
10 questions
資安素養3~網路行為的法律責任

Quiz
•
3rd - 12th Grade
10 questions
網際網路常識

Quiz
•
5th Grade
7 questions
2-2 收發電子郵件

Quiz
•
4th Grade
7 questions
程序编码

Quiz
•
3rd Grade
10 questions
網路安全知多少

Quiz
•
6th Grade
10 questions
演算法

Quiz
•
7th - 9th Grade
10 questions
网络安全漏洞-Quiz

Quiz
•
1st - 5th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
typing

Quiz
•
6th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade