Python Institute PCEA sample questions with explanations for files, APIs, retries, logging, idempotency, and scheduling.
These original sample questions are designed to help you check how PCEA topics appear in decision-style prompts. They are not taken from the live exam.
Use these sample questions as a guided self-assessment for PCEA-30-0x: Certified Entry-Level Automation Specialist with Python topics such as command-line scripts, files, CSV and JSON data, simple web/API interactions, logging, monitoring, scheduling, reports, retries, and safe reruns. The prompts focus on practical automation judgment.
The sample set below is part of the Python Institute PCEA guide path:
Work through each prompt before opening the explanation. PCEA questions reward controlled side effects: validate before writing, bound retries, log useful evidence, and make scheduled work safe to rerun.
Topic: Safe file output
A script reads a CSV file, creates a cleaned output file, and then replaces yesterday’s report. The input file sometimes contains malformed rows. What is the safest output strategy?
Best answer: B
Explanation: A temporary-output pattern prevents a failed run from destroying a known-good report. The script can validate input, count rejected rows, and replace the final file only when the new output is complete and acceptable.
Why the other choices are weaker:
What this tests: File automation, validation, temporary outputs, and safe replacement.
Related topics: File handling; CSV; Validation; Safe overwrite; Reporting
Topic: API timeouts and retries
An automation script calls a simple API every hour. Sometimes the API does not respond, and the script hangs until someone kills it manually. What should the developer add first?
Best answer: A
Explanation: Automation should not hang indefinitely. A timeout limits waiting, status-code checks validate the response, bounded retries handle transient problems, and logs explain what happened.
Why the other choices are weaker:
What this tests: API automation, timeouts, retry limits, and failure evidence.
Related topics: APIs; Timeouts; Retries; Status codes; Logging
Topic: Idempotency
A scheduled script sends reminder emails for overdue tasks. After a crash and rerun, some users receive duplicate reminders. Which change best addresses the problem?
Best answer: A
Explanation: Idempotent automation records successful work so reruns can continue safely without repeating completed side effects. A stable reminder ID or checkpoint is stronger than relying on perfect scheduling.
Why the other choices are weaker:
What this tests: Idempotency, checkpoints, scheduled tasks, and duplicate prevention.
Related topics: Idempotency; Scheduling; Checkpoints; Notifications; Safe reruns
Topic: Logging useful evidence
A nightly file-processing job prints only done or failed. When it fails, no one knows which input record caused the problem. What is the best improvement?
done.Best answer: A
Explanation: Useful logs explain what happened without exposing sensitive data. Counts, identifiers, error type, and final status give operators enough evidence to retry or repair the input.
Why the other choices are weaker:
What this tests: Logging, monitoring, troubleshooting evidence, and secret hygiene.
Related topics: Logging; Monitoring; Error handling; Redaction; Run summary
Tech Exam Lexicon and IT Mastery are independent study tools. They are not affiliated with, endorsed by, or sponsored by Python Institute or any certification body.