Module 7 of 16 · Build: Code & Create

Code Adventures: Python Programming

Write your first code! Variables, loops, functions — all through fun projects.

35 chapters

What this module covers

Code Adventures is the Python module. It assumes no prior coding: the first chapter is a student's first program, and each chapter after it adds one idea, from variables and numbers to working with text and getting input from the user.

The middle chapters cover control flow (if statements and loops) and reusable code (functions). The last chapters are the ones AI work depends on: lists and dictionaries, reading and writing files, working with CSV data, and handling errors so a program does not crash on bad input.

Start coding in Python! Build your first AI projects — chatbots, image editors, games, and more.

Chapter topics

  1. Your First Python Program
  2. Variables: Storing Information
  3. Numbers and Math
  4. Working with Text
  5. Getting User Input
  6. Making Decisions (If Statements)
  7. Loops: Repeat Actions
  8. Functions: Reusable Code
  9. Lists and Dictionaries
  10. Reading and Writing Files
  11. Working with CSV Data
  12. Error Handling

Plus 23 more chapters in the app.

Activities

  • Code Puzzles
  • Bug Hunt Challenge
  • Build-a-Calculator

After this module, students can

  • Write and run short Python programs with variables, loops and functions
  • Load a CSV file and work with its rows and columns
  • Read an error message and fix the bug it points to

Go deeper

Start learning in the app

The first 3 chapters are free, no card needed.