← All PCAP Flashcard Decks

Object-Oriented Programming Flashcards

6 cards from real PCAP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 Object-Oriented Programming flashcards as text
  1. Which attribute stores the name of a class in Python?

    Answer: __class__.__name__

    `__class__.__name__` returns the name of the class of an object as a string.

  2. What is the result of using `@staticmethod` decorator on a method?

    Answer: The method has no access to instance or class

    A static method does not receive an implicit first argument and cannot access instance or class state.

  3. What does the `@classmethod` decorator do?

    Answer: Passes the class as the first argument instead of the instance

    A class method receives the class (`cls`) as its first argument instead of the instance (`self`).

  4. What is multiple inheritance in Python?

    Answer: A class that inherits from more than one parent class

    Multiple inheritance allows a class to inherit attributes and methods from more than one parent class.

  5. Which dunder method allows an object to be represented as a string when printed?

    Answer: __str__

    `__str__` is called by `print()` and `str()` to return a human-readable string representation.

  6. What is the MRO (Method Resolution Order) used for in Python?

    Answer: Determining the order methods are inherited in multiple inheritance

    MRO determines the order in which Python searches parent classes for a method in multiple inheritance.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. pythoninstitute.org — Eligibility, fees, retake fee, retake policy, score release, time limit, score validity · verified Nov 2026
  2. home.pearsonvue.com — Test delivery · verified Nov 2026