python2-lesson13

python2-lesson13

3rd - 11th Grade

10 Qs

quiz-placeholder

Similar activities

4年级设计与工艺单元6电脑编程,我最行

4年级设计与工艺单元6电脑编程,我最行

4th Grade

9 Qs

Scratch001

Scratch001

3rd - 6th Grade

10 Qs

2021-2022_P3_Chinies Typing_1

2021-2022_P3_Chinies Typing_1

3rd Grade

14 Qs

台中市三年級資訊2-01瀏覽器的使用-01悠遊地球村

台中市三年級資訊2-01瀏覽器的使用-01悠遊地球村

3rd - 4th Grade

10 Qs

第七章 应用软体

第七章 应用软体

11th Grade

10 Qs

2020 Excel上半年复习

2020 Excel上半年复习

10th Grade

12 Qs

數位時代

數位時代

9th Grade

10 Qs

11302_04_程式概念(01)

11302_04_程式概念(01)

7th Grade

10 Qs

python2-lesson13

python2-lesson13

Assessment

Quiz

Computers

3rd - 11th Grade

Practice Problem

Medium

Created by

hang zheng

Used 33+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

阅读图中代码,现在如果想根据Car类创建一个实例,下列代码书写正确的是?

c=Car("red")

c=Car

c=Car()

c=Car(self)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

观察上图代码,现在需要创建一个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

Media Image

观察上图代码,c是Car类的一个实例,现在想打印出c中color属性,下列代码正确的是?

print(c)

print(Car.color)

print(c.color)

print(color)

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?