Good place to stop if you're short on time — step 3 picks up here.
Without scrolling back — what does shot_duration == target_duration actually produce?
A boolean — True if they're equal, False if they're not. The == sign checks equality; it doesn't assign anything.
Without scrolling back — what tells Python which lines belong to the if block versus the else block?
The indent — same as a loop. Everything indented under if runs when the condition is True; everything indented under else runs when it's False.
Without scrolling back — in an elif chain, if the first condition is True, does Python still check the rest?
No. It stops at the first True branch and skips everything after it, even if a later condition would also be True.
For boolean inputs, how do and, or and not differ?
and needs both sides True; or needs only one side True; not flips True to False and False to True.
Record which ideas needed assistance and revisit their lessons. Self-review is not a scored correct answer.
Every decision tool from this week in one file: booleans, if / else, elif, and combined logic. You will read it, rebuild it from memory, repair a broken one, then apply the ideas to a new independent brief.
If the rebuild is hard, that is information — not failure.
Lesson idea Tap to fold
Answer all four before you look. Each answer is behind its own disclosure.
Day 6. What type of value does a comparison like == or < actually produce?
Show the answer
A boolean — True or False. The comparison asks a question; it doesn't assign anything.
Day 7. What decides whether the if block or the else block runs?
Show the answer
The boolean right after if. True runs the if block, False runs the else block. Exactly one of the two runs.
Day 8. In an if/elif/elif/else chain, how many branches actually run?
Show the answer
Exactly one — the first one whose condition is True. Python stops checking the moment it finds one.
Day 9. What's the difference between and and or?
Show the answer
and needs both sides True to be True. or needs only one side True to be True.
Nothing new — the four ideas working together
There is no fifth idea. Today is the four you already have, in one piece of code, the way they actually turn up in real work: a boolean built from a comparison, an if, an elif, and an and/or deciding which branch runs.
That is worth a day on its own. Each idea made sense in isolation this week. Reading them together, in one file, is a different skill — and it is the skill the job actually needs.
The middle exercise takes the boolean and the elif branch away and asks you to put them back from memory. The last one hands you code that is already broken and asks you to work out why before you touch it.
If the rebuild is hard, that is information, not failure. Whatever you had to look up is exactly the thing to revisit before week 3 — that is the point of asking you to do it without the example in front of you.
Nobody holds this after four days. Looking something up is what working programmers do all day. The only thing worth noticing is which thing you looked up, because that tells you where next week should start.
Slow down on the repair exercise. Read the broken code line by line and say what each line does before you change anything. Then build the final, independent task from its new brief. Working out why code fails, without running it, is the thing that separates copying from understanding.
Predict, explain, then test
These three short checks are self-reviewed, not a quiz score. The code checks below rerun your rule on changed inputs and boundaries. They keep your named input facts and check your rule, not one required quote style.
Trace before running
The toy rule warns if duration matches OR errors are at most two. What happens for mismatched duration and two errors?
Compare your answer · self-reviewed
Warning. The second operand is True; or needs only one. This permissive classroom rule is not an authoritative QC policy.
Find a boundary test
Which changed input distinguishes error_count <= 2 from error_count < 2?
Compare your answer · self-reviewed
A mismatched duration and exactly two errors. The inclusive rule warns; the strict rule falls through to Fail.
Recall a function
Why is returning a decision useful when you later package a QC tool?
Compare your answer · self-reviewed
The caller can use or test a returned value. Printing only displays text and does not give the caller the decision.
Independent transfer: a new review rule
Write qc_decision(audio_ok, video_ok, error_count). For boolean audio/video inputs and a nonnegative integer error_count, return Pass only when both parts pass and errors are zero; return Review when both parts pass and errors are one or two; otherwise return Hold. This is a new classroom policy, not an authoritative delivery judgment. Use return, not a printed fixed answer. Refresh Day 4 functions if needed. Try new inputs and boundaries.
Choose Independent transfer: a new review rule in the exercise controls. Write the function from this brief, not from the earlier toy rule. Review parameters and return if needed.
Read the unfinished starter without running Python
# Build a decision from a new brief
def qc_decision(audio_ok, video_ok, error_count):
# Replace this unfinished return with your rule
return ""
# Inspect three different decisions
print(qc_decision(True, True, 0))
print(qc_decision(True, True, 2))
print(qc_decision(False, True, 0))
Expected sample output: Pass, Review, Hold on three separate lines. Behavioral checks also call your function with all four boolean pairs and counts at zero, one, two, three and seven. A printed report is not a substitute for the returned decisions.
Choose an exercise to load its prompt.
No new idea today, so nothing to pair it with. If the week stuck and you want more, the official tutorial keeps going from exactly where booleans and conditionals leave off.
- The Python Tutorial — official docs, python.org
Loading exercises…
Noted on your route map, with the step you were on. Nothing is lost by parking it — the next review day will bring this idea back, and the flag tells the course where to slow down.
Section 2 checkpoint
Answer five questions, then review the explanations. This score is separate from the coding checks. The lesson, brief checks and authored hints do not require tutor login.
The tutor mounts here when JavaScript is available. The lesson above stays readable without it.