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

Coursera课程Python for everyone:Quiz: Object Oriented Programming相关推荐

  1. python Object Oriented Programming

    python 知识点整理(五) 本文只是对python部分知识点进行学习和整理 本篇主要是针对python的Object Oriented Programming的总结 本文目录 python 知识点 ...

  2. Python编程基础:第三十九节 面向对象编程Object Oriented Programming

    第三十九节 面向对象编程Object Oriented Programming 前言 实践 前言 到目前为止我们都是函数式编程,也即将每一个功能块写为一个函数.其实还有一种更常用的编程方式被称为面向对 ...

  3. Java SE 008 理解面向对象程序设计 (Inside Object Oriented Programming)

    Java SE 008 理解面向对象程序设计 (Inside Object Oriented Programming) 前言:此笔记为圣思园张龙老师讲述的java视频课程笔记,自己看视频学习时记录的, ...

  4. Object Oriented Programming面向对象编程

    OOP 面向对象编程( Object Oriented Programming)是一种 计算机编程 架构.OOP 的一条基本原则是 计算机程序是由单个能够起到子 程序作用的单元或 对象组合而成.OOP ...

  5. Java OOP(Object Oriented Programming)个人理解及总结

    面向对象编程(Object Oriented Programming,OOP,面向对象程序设计) 其三大特征:封装,继承,多态: 封装:解决数据的安全问题. 继承:解决代码的重用问题. 多态:解决程序 ...

  6. 面对对象编程(OOP, Object Oriented Programming)及其三个基本特性

    一千个读者,一千个哈姆雷特.对于面对对象编程,书上都会告诉我们它有三个基本特性,封装,继承,多态,但谈起对这三点的见解,又是仁者见仁智者见智,感觉还是得多去编程中体验把 . 面向对象编程(OOP, O ...

  7. 面向对象编程(Object Oriented Programming)概念总结及延伸(一)

    1.介绍 笔者的梦想是成为一个架构师,但是要成为一个合格的架构师是相当不易的,它既需要丰富的项目经验也需要不断地吸取新的知识,而且在这过程中我们也要不断巩固基础知识.我也注意到了,现在主流的文章大都集 ...

  8. OOP(Object,Oriented Programming)

    1.面向对象概念 在学习面向对象之前,我们可以先了解一下面向过程.面向过程是一种思想,意思是我们要做任何事,都需要亲力亲为,强调的是过程. 面向对象也是一种编程思想,相对于面向过程,我们可以由原来问题 ...

  9. Coursera课程Python for everyone:Quiz: Many-to-Many Relationships and Python

    Many-to-Many Relationships and Python 9 试题

最新文章

  1. 在iOS端如何使用Charles用作http调试
  2. JAVA中0 结果_Java练习题-求1000!的结果中包含多少个0
  3. softmax(a,axis=0)的用法理解 总结
  4. ImportError: No module named setuptools
  5. VC2010 项目的创建
  6. 数据库远程导入导出步骤
  7. Android开发 ——线性布局文件、TextView、ListView的基本写法
  8. Java实现求阶乘和的三种方法
  9. yum 查看安装的包 包含了哪些文件
  10. Access根据出生日期计算年龄_从身份证号码计算年龄
  11. Linux安装iptables防火墙
  12. 微机原理笔记day01 计算机发展史,和计算机组成部分
  13. 15行代码轻松绕过淘宝反爬虫机制
  14. 生存预测 : kaggle titanic 泰坦尼克号 逻辑回归(Logistic回归) tensorflow版
  15. dede taglist模板中调用自定义字段
  16. 【FFT】快速傅里叶变换
  17. 概率论与数理统计(3.4) 相互独立的随机变量
  18. wps2016向程序发送命令_Excel:向程序发送命令时出现问题
  19. 程序员兼职接私活平台大全,兼职也能月薪上万
  20. Java后端基础知识笔记

热门文章

  1. 快讯 | 美国投资公司Avenue Capital Group联合创始人Marc Lasry:比特币价格可能达到40,000美元...
  2. 雷军:小米逐梦之旅的三大秘诀
  3. MyBatis-06 MyBatis XML方式之多个接口参数用法
  4. gitlab mysql 表_gitlab-mysql_高可用
  5. Dubbo服务引用过程
  6. 删除机器人 异星工厂_10个视频,它们是国内智能工厂的标杆
  7. 部署并使用Docker(Alibaba Cloud Linux 2)
  8. ROS知识:关于如何命名的约定
  9. MongoDB 基础用法及学习笔记
  10. 基于模糊控制的自平衡小车的研究