Exam · Python: from first script to a useful automation

Take the exam and earn your certificate.

A real, server-scored exam for this course. Score strictly above 80% to pass and get a genuine, verifiable certificate.

Before you start

We ask for your name and email first, the same as a PDF download, so we know you are here and your certificate can carry the right name.

We privately record your name, email and request IP for this exam request. Read the privacy notice and retention policy.

Visit Mickai on LinkedIn

Complete the security check before submitting.

Cloudflare Turnstile helps prevent automated submissions. How this check uses data.

You can retake the exam any time. Each attempt draws a fresh set of questions.

Written practice, ungraded

Write your response in your own notes, then compare it with the sample answer. This practice is separate from the scored exam and does not affect your certificate.

Practice 1

Explain how you would save and run your first script, and what to do if Python is not found.

Compare with a sample answer

Save it with a name ending .py, not .py.txt, open a terminal in that folder and run python hello.py. If the command is not found, try py or python3, or repeat the install using the current instructions on python.org and read any prompt about your PATH, where your computer looks for programs. The workbook was tested on Python 3.12.10 on Windows 11 but asks only for a supported version.

The sample covers saving with a .py name, running the script, and what to try if Python is not found.

Practice 2

Explain how the order loop treats known and unknown items and how it formats its total.

Compare with a sample answer

For each ordered item, add its price if it is in the dictionary; otherwise report it as missing and skip it. The total is printed with two decimal places. If the total is above 10, the exercise multiplies it by 0.9 after the loop.

The sample identifies loop/decision/formatting and the exercise discount position.

Practice 3

Describe how you would create the six practice files and count their groups.

Compare with a sample answer

Run the script with no options and read the would-create plan, then add --create in a fresh practice folder. If practice already exists, mkdir stops with an error. Group by lowercase suffix with Other as the fallback, skip anything that is not a file and print the counts in sorted order.

The sample retains default planning, explicit creation, folder refusal and classification.

Practice 4

Explain the difference between an empty and a missing CSV amount and describe a careful error-reporting policy.

Compare with a sample answer

An empty amount is empty text, so float conversion raises ValueError. A short row gives None, so conversion raises TypeError. Catch those expected errors if you plan to skip such rows, report how many were skipped, and do not return zero or hide other failures.

The sample names exact exceptions and deliberate visible skipping.

Practice 5

Describe how you would run the folder tool safely on a copy, and name its limits around existing destinations, linked folders and the log.

Compare with a sample answer

Use a plain practice copy, read the whole dry run, and add --apply only when the plan looks right. The tool checks destination.exists() first and skips a file whose name is taken, so nothing is overwritten. A group folder that is really a shortcut or link can send files somewhere else. The log is written after the files have moved, so if it cannot be written the move has still happened: keep the dry run output too.

The sample follows the course: check the destination first, skip a name that is taken, and keep the dry run output because the log is written after the move.

Practice 6

Review the average function from the exercise: list four problems and say what it prints.

Compare with a sample answer

It prints 0. It ignores its filename argument, uses a hard-coded path, never closes its file and hides every error with a bare except. It would also choke on the header row.

The sample lists the defects the exercise names and says the function prints 0.

About this exam

Is this exam graded?

Yes. Every question is scored on our server, never in your browser, and you need a score strictly above 80% to pass. The questions are a real, reviewed bank for this course, drawn fresh for each attempt.

Is it only multiple choice?

Yes. This is a multiple-choice knowledge assessment, with at least one question from each chapter in every attempt. Written exercises are separate practice and are not automatically scored. Passing does not establish practical professional competence or independently verify identity.

Is there a time limit?

Yes, 45 minutes, shown as a countdown once you start. If time runs out, whatever you have answered is submitted automatically.

Do I need to download the PDF first?

No. This course's full text is on its own page, so you can read it online and come straight here when you feel ready.

What do you do with my name and email?

We privately record your name, email, request IP, course and privacy acknowledgement for this request. Newsletter consent is separate and optional. See /privacy.html for storage and retention. A passed exam creates a server-stored named certificate. An email confirmation is not identity assurance.

Can I retake it if I fail?

Yes, straight away. Each attempt draws a fresh set of questions and shuffles the answer order, so it will not be identical to your last attempt, and an attempt can only be submitted once.

Is the certificate real?

It is a genuine, server-issued certificate with its own verification page and a unique ID, not a self-declared one. It records that you passed this course's exam on this date. It is not an accredited qualification, a professional licence or proof of employment.