1) Object-oriented programming (OOP) describes... a) the properties of different objects b) different classes and objects in a single unit c) a style or model of programming that uses objects. d) a function that uses objects and classes 2) What is the meaning of object in programming ? a) collection of data and methods as two different units. b) collection of data and methods as a single unit. c) classification of data and methods as a single unit. d) classification of data and methods as two different units 3) Choose the wrong description about class. a) a template or “blueprint” for creating an object. b) one class has only one object c) involves in the making of mini battle game d) if class = vegetables, then objects = carrot, brinjal, tomato 4) Syntax for creating a class is... a) Class num = b) class "fruit" : c) class time ; d) class Teacher : 5) If def __init__ (self, name): , the object could be... a) Ali b) Ali, 8 years old c) Kelvin, 23 August 2009 d) Syazwan, Year 8 6) What is a "method" ? a) An array of elements in a same class b) All the objects in a same class c) A variable used to represent an object d) A function that belongs to a class / object 7) When p.walk(0, 7) is executed, the player... a) walk 7 units right b) walk 7 units down c) walk 7 units up d) walk 7 units left 8) Choose the correct statement. a) self can access variables from other class b) self represents the other object in the same class c) self parameter has no argument d) self is passed as a shown parameter 9) enemy.takeDamage(10) means that... a) enemy will absorb 10 HP from the player b) enemy will lose HP by 10 after each damage c) enemy will die when received damage of 10 d) enemy has only 10 HP left for now 10) When enemy is defeated, which code is not written ? a) print("Enemy defeated!") b) if (self.hp <= 0): c) else d) self.hp = 0 11) Choose the correct explanation about "attribute". a) Attribute is actually a variable belongs to a class b) We can only have one attribute in each class c) No value is needed for attribute d) attribute is named before "self" 12) def __init__ (self, name, age): . Which of the following cannot be its value? a) 23 years 6 months and 26 days b) 23 years old c) Jonathan d) 3 November 2017
0%
Coding Quiz (12) : Python OOP
공유
공유
공유
만든이
Guanjie0807
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
게임쇼 퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?