Question 1
In the package layout below, which file marks `mypkg` as a regular Python package? mypkg/ __init__.py utils.py
Correct Answer:
__init__.py
Question 2
What does this snippet print when run as the main script? if __name__ == '__main__': print('main') else: print('imported')
Correct Answer:
main
Question 3
Which import style triggers a circular import only at the module-load time?
Correct Answer:
from x import func
Question 4
Which standard library module would you use to generate cryptographically secure random tokens?
Correct Answer:
secrets
Question 5
What does this code print? import math print(math.floor(-2.3), math.ceil(-2.3))
Correct Answer:
-3 -2
Question 1
Exam overview

About this Exam

Prepare with the PCAP Practice Questions - OpenEDG PCAP - Certified Associate in Python Programming (PCAP-31-03) Exam practice quiz. This question bank includes 100 questions covering print, self, code, class, and output. Use it to review important concepts, identify knowledge gaps, and build confidence for the related exam, course, or assessment.

More details

Additional Information

PCAP Practice Questions - OpenEDG PCAP - Certified Associate in Python Programming (PCAP-31-03) Exam

This practice set contains 100 questions from the matching question bank and focuses on print, self, code, class, and output. 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