warming up your workspace

Python Foundations through Aerospace

Never written code before? Start here. You will learn the absolute basics of Python, output, variables, types, decisions, loops, and functions, using rockets, orbits, and flight as your playground. By the end you are ready for Project 1.

First words

  1. Display a message with Python
  2. Display altitude and speed
  3. Add comments to explain your code
  4. Name a value and join text
  5. Calculate a thrust-to-weight ratio

Remembering things

  1. Store and display an altitude
  2. Update an altitude after a climb
  3. Store numbers, text and true-or-false values
  4. Convert a text reading to an integer
  5. Use meaningful names for a flight record

Making choices

  1. Compare altitude with a cloud-top height
  2. Run an instruction only when a condition is true
  3. Choose between two messages with else
  4. Choose an altitude band with elif
  5. Combine two conditions with and

Doing it again

  1. Repeat a countdown with while
  2. Count climb steps with for and range
  3. Add distances with a running total
  4. Stop a loop with break
  5. Visit stage and time pairs with nested loops

Many values and reuse

  1. Store altitude readings in a list
  2. Find the highest recorded altitude
  3. Define and call a calculation function
  4. Reuse a function with different inputs
  5. Capstone: a flight-status reporter

Explore the full field