Question 1
What does this code do? from abc import ABC, abstractmethod class Animal(ABC): @abstractmethod def speak(self): pass a = Animal()
Correct Answer:
Raises TypeError because Animal has abstract methods
Question 2
What does this code print? from abc import ABC, abstractmethod class Shape(ABC): @abstractmethod def area(self): pass class Square(Shape): def __init__(self, s): self.s = s def area(self): return self.s ** 2 print(Square(4).area())
Correct Answer:
16
Question 3
What does this code output? class A: def f(self): return 'A' class B(A): def f(self): return 'B' class C(A): def f(self): return 'C' class D(B, C): pass print(D().f(), D.__mro__[1].__name__)
Correct Answer:
B B
Question 4
What is a 'mixin' class in Python?
Correct Answer:
A small class providing optional methods, intended only for inheritance, not instantiation
Question 5
What does this code print? class A: def __getattr__(self, name): return f'no {name}' a = A() a.x = 5 print(a.x, a.y)
Correct Answer:
5 no y
Question 1
Exam overview

About this Exam

Prepare with the PCPP1 Practice Questions - OpenEDG PCPP1 - Certified Professional in Python Programming Level 1 (PCPP-32-101) Exam practice quiz. This question bank includes 100 questions covering print, code, class, self, and import. Use it to review important concepts, identify knowledge gaps, and build confidence for the related exam, course, or assessment.

More details

Additional Information

PCPP1 Practice Questions - OpenEDG PCPP1 - Certified Professional in Python Programming Level 1 (PCPP-32-101) Exam

This practice set contains 100 questions from the matching question bank and focuses on print, code, class, self, and import. Work through each question carefully, review the provided solutions, and revisit topics that need more study before your next attempt.

This is an independent study resource intended for practice and review; it is not an official examination or an endorsement by any organization named in the title.

Quiz information

Frequently Asked Questions

The complete question count is available after full access is unlocked.
No fixed duration is currently configured for this quiz.
Question explanations are included where they are available in the quiz content, helping you review the reasoning after answering.
Yes. You can retake the practice test again as you continue studying during your available access period.
After your access is confirmed, you can continue into the complete practice exam from this quiz flow.
Unless explicitly stated otherwise, this page provides independent practice material for study and exam preparation and is not the official examination itself.
Keep studying

Related Questions