日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > python >内容正文

python

Coursera课程Python for everyone:Quiz: Object Oriented Programming

發(fā)布時(shí)間:2025/3/21 python 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Coursera课程Python for everyone:Quiz: Object Oriented Programming 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Object Oriented Programming

11?試題

1.?

Which came first, the instance or the class?

instance

class

function

method

2.?

In Object Oriented Programming, what is another name for the "attributes" of an object?

portions

messages

forms

fields

methods

3.?

At the moment of creation of a new object, Python looks at the _________ definition to define the structure and capabilities of the newly created object.

cache

class

constructor

method

instance

4.?

Which of the following is?NOT?a good synonym for "class" in Python?

blueprint

pattern

direction

template

5.?

What does this Python statement do if PartyAnimal is a class?

zap = PartyAnimal()

Copy the value from the PartyAnimal variable to the variable zap

Subtract the value of the zap variable from the value in the PartyAnimal variable and put the difference in zap

Clear out all the data in the PartyAnimal variable and put the old values for the data in zap

Use the PartyAnimal template to make a new object and assign it to zap

6.?

What is the syntax to look up the fullname attribute in an object stored in the variable colleen?

colleen->fullname

colleen['fullname']

colleen::fullname

colleen.fullname

7.?

Which of these statements is used to indicate that class A will inherit all the features of class B?

class A(B) :

class A inherits B :

class A extends B :

A=B++;

class A instanceOf B :

8.?

What keyword is used to indicate the start of a method in a Python class?

break

function

continue

def

9.?

What is "self" typically used for in a Python method within a class?

To refer to the instance in which the method is being called

The number of parameters to the method

To set the residual value in an expression where the method is used

To terminate a loop

10.?

What does the Python dir() function show when we pass an object into it as a parameter?

It shows the methods and attributes of the object

It shows the number of parameters to the constructor

It shows the type of the object

It shows the parent class

11.?

Which of the following is rarely used in Object Oriented Programming?

Method

Attribute

Constructor

Destructor

總結(jié)

以上是生活随笔為你收集整理的Coursera课程Python for everyone:Quiz: Object Oriented Programming的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。