warming up your workspace

Python Foundations through GPU Graphics

Learn Python output, variables, types, decisions, loops and functions using small work-count and array examples. Printed device labels are practice text; the exercises run CPU Python.

First words

  1. Make the computer speak
  2. Printing numbers
  3. Notes the computer ignores
  4. Words and labels
  5. A first calculation

Remembering things

  1. Store a value in a name
  2. Change what a variable holds
  3. Numbers, decimals, and text
  4. Turn text into a number
  5. Names that explain themselves

Making choices

  1. Yes or no: a comparison
  2. if: act only when true
  3. if / else: two paths
  4. elif: more than two cases
  5. and / or: combine conditions

Doing it again

  1. while: a countdown
  2. for and range: count steps
  3. Build a running total
  4. break: stop early
  5. Loops inside loops

Many values and reuse

  1. A list of values
  2. Loop a list to find the max
  3. Your first function
  4. Inputs and outputs
  5. Capstone: a classifier

Explore the full field