Week 2

Python Foundations II

Conditions, loops, functions, and collections.

Learning goals

Suggested classroom flow

SessionFocusOutput
Day 1Concept introduction and guided examplesNotebook or script
Day 2Hands-on lab and teacher walkthroughWorking code
Day 3Practice tasks and discussionAssignment draft
Day 4Assessment and mini projectSubmission

Mini project

Student Report Generator

Outcome for the week: students should finish with usable code, a short explanation, and at least one visual or result artifact.

Quick MCQ preview

Q1. Which keyword defines a function?

Explanation: Python uses def.

Q2. Which collection stores key-value pairs?

Explanation: dict stores key-value pairs.

Q3. Which loop is best when the number of repetitions is known?

Explanation: for is used when iteration count is known.