Skip to main content
New Self-paced AI courses — learn ML, deep learning, and agents on your schedule. Enroll free

Python and FastAPI

Module 2 · Python basics: values, variables, decisions, loops and functions

The core language from zero: names and values, comparisons, if/else, for and while loops, patterns, functions, modules, input and output, style, and two mini projects.

10 lessons Follow in order
Use the button below to sign in and unlock lessons.
Your path

Lessons in sequence

Work through these in order—each lesson builds on the previous one.

  1. Lesson 1 of 10

    2.1 Variables and types

    Enroll to open · 24 min read

  2. Lesson 2 of 10

    2.2 Names, objects and the memory model

    Enroll to open · 26 min read

  3. Lesson 3 of 10

    2.3 Truthiness and comparisons

    Enroll to open · 26 min read

  4. Lesson 4 of 10

    2.4 Control flow: if, elif, else

    Enroll to open · 28 min read

  5. Lesson 5 of 10

    2.5 Loops: for, while, break and continue

    Enroll to open · 30 min read

  6. Lesson 6 of 10

    2.6 Nested loops and pattern problems

    Enroll to open · 30 min read

  7. Lesson 7 of 10

    2.7 Functions and modules

    Enroll to open · 27 min read

  8. Lesson 8 of 10

    2.8 input(), print() and basic I/O

    Enroll to open · 26 min read

  9. Lesson 9 of 10

    2.9 Writing readable code: PEP 8 and good habits

    Enroll to open · 29 min read

  10. Lesson 10 of 10

    2.10 Mini projects: a guessing game and a calculator

    Enroll to open · 30 min read

← Back to course