
python2-lesson13

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

hang zheng
Used 33+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
如果想要创建一个类,需要用到哪个关键字
def
class
open
for
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
创建一个类,哪个函数是必须的?
--init--(self)
__init__()
init(self)
__init__(self)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
__init__(self)函数中的self代表什么?
代表每一个创建的实例对象
什么都不是,只是一个规范而已
代表类本身
代表一个传入的参数
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
阅读图中代码,现在如果想根据Car类创建一个实例,下列代码书写正确的是?
c=Car("red")
c=Car
c=Car()
c=Car(self)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
观察上图代码,现在需要创建一个Car类的实例,下列哪种方式是正确的。
c=Car()
c=Car(c,"red","电动车",4)
c=Car("red","电动车",4)
Car("red","电动车",4)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
现在已经存在一个People类,想要在类中增加一个新的方法,名字叫做playgame,下列代码正确的是?
def playgames(self):
def playgames():
def (playgames):
def ()playgames:
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
观察上图代码,c是Car类的一个实例,现在想打印出c中color属性,下列代码正确的是?
print(c)
print(Car.color)
print(c.color)
print(color)
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
网络与通讯2

Quiz
•
10th Grade - University
10 questions
四年级设计与工艺:我爱设计

Quiz
•
4th - 6th Grade
15 questions
六年级TMK 单元3 编程与测试

Quiz
•
6th Grade
8 questions
哥斯拉

Quiz
•
1st - 5th Grade
10 questions
【2】 Ms Excel 基础 - Chart S3ADY

Quiz
•
9th - 12th Grade
12 questions
Scratch介绍与动画基础

Quiz
•
3rd - 6th Grade
12 questions
S07.2 常见的应用软体

Quiz
•
10th Grade
10 questions
伪代码与流程图表示算法

Quiz
•
4th - 6th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade