Skip to content
KCL TechAcademy
HomeCoursesSign in
Menu
HomeCoursesSign in
  1. Courses
  2. /Python: From 0 to 1
  3. /Week 2

Logic and Control Flow

In Week 2, we move beyond basic scripts and teach our code how to make decisions on its own. You will learn how computers evaluate True and False logic, handle messy user inputs, and route data using control flow. By the end of the session, you will combine all these skills to build a dynamic, automated checkout system for a high street charity shop that can evaluate items and apply student discounts on the fly.

Content Covered:

Boolean Logic: Understanding True and False data types.

Evaluating Logic: Using comparison operators (==, !=, >, <) to let the computer answer questions.

Compound Logic: Checking multiple conditions at once using and, or, and not.

Control Flow: Building branching paths using if, elif, and else statements.

Input Sanitization: Making your programs bulletproof against messy user typing with .lower().

Advanced Routing: Using nested if statements for complex decision-making.

Practical Build: The Advanced Charity Shop Till Mini-Challenge.

Your next step

Take your time with the material. Mark it complete when you’re ready.

Sign in to track progress

Related to this lesson

← Intro to Python & PyCharmData Structures and Loops →
KCL Tech AcademyLearn. Build. Share what you know.