OOP Basics

36 MCQs

MCQs

36 questions · 30 min · 36 marks

Want to try first? Take the free Computer Science test: Networks Basics

Sample questions

The first 5 of 36. Try each one, then tap to see the answer.

  1. Question 1

    The keyword used to define a class in Python is:

    • Adef
    • Bclass
    • Cfunction
    • DObject
    Show answer

    Answer: B

    Python uses the class keyword to define a class.

  2. Question 2

    Object-Oriented Programming is a method of designing programs using:

    • AFunctions and loops
    • BTables and keys
    • CModules and packages
    • DObjects and classes
    Show answer

    Answer: D

    OOP designs programs around objects and classes.

  3. Question 3

    Each object in OOP represents:

    • AA reusable loop
    • BA single variable
    • CA real-world entity with properties and behaviours
    • DA compiled file
    Show answer

    Answer: C

    An object models a real-world entity with specific properties and behaviours.

  4. Question 4

    Classes act as:

    • ATemplates for creating several similar objects
    • BContainers for one fixed value
    • CStorage for deleted data
    • DCopies of finished programs
    Show answer

    Answer: A

    A class is a template used to create multiple objects with similar characteristics.

  5. Question 5

    Which three concepts does OOP emphasise to manage data and behaviour?

    • ALooping and branching and recursion
    • BEncapsulation and inheritance and polymorphism
    • CCompilation and linking and debugging
    • DSorting and searching and hashing
    Show answer

    Answer: B

    OOP emphasises encapsulation and inheritance and polymorphism.

More tests in Object Oriented Programming Using Python

Practise with a free account

Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.

Create free account