YOUR NEXT DISCOVERY

Programming basics: build your first small programs

Learn what programs do, how variables remember information, and how decisions, loops and functions work together.

Complete the Course to Earn a Certificate and Join the Hall of Fame

Stored values pass through a branch, a loop and a function.

See it. Try it. Make it yours.

  1. What a program is and how variables remember information.

  2. How a program decides what to do next.

  3. How loops repeat a task and know when to stop.

For beginners. · What to know before you start

Bring with you: Add, subtract and multiply small whole numbers. Compare numbers: greater than, less than and equal.

A game score, a ticket price and a repeated reminder all need precise instructions. Learn to turn a small goal into steps a computer can follow—and find the mistake when its result is wrong.

Begin with one stored value. Add input, decisions, repetition and reusable functions, then assemble and test a small program. Every new symbol is explained before you need it; no installation is required.

By the end, you can…

  • Explain how a program stores and replaces a value.
  • Work out and repair updates to a stored value.
  • Follow inputs, outputs and saved copies without mixing them up.
  • Write a small decision that works at its limits.
  • Use repetition without losing a total or running forever.
  • Build and use a small function with inputs and a result.
  • Plan, assemble and test a small program that combines these ideas.

For another Course

  • A complete Python language reference or installing a development environment.
  • Lists, recursion, object-oriented programming, websites and production applications.

YOUR LEARNING PATH

One idea leads to the next.

0 of 16 Missions completed or proven
Unit 1

Programs, variables and information

Explain what programs do, then store, change, receive and display values.

  1. Programs and variables: store a valueMission 1 of 16Locked. Explain what a variable remembers, and predict its value after two instructions.
  2. Update a variable, one instruction at a timeMission 2 of 16Locked. Use the current stored value to calculate each update, then put updates in the right order.
  3. Get information in; show a resultMission 3 of 16Locked. Distinguish input, a stored value and output, using numbers and text.
  4. Keep a copy before a value changesMission 4 of 16Locked. Save an original value and explain why changing the source does not change its copy.
Unit 2

Decisions and conditions

Choose actions with clear conditions and handle boundary cases.

  1. Make a choice with if and elseMission 5 of 16Locked. Follow one comparison and the branch it selects.
  2. Include the boundary—or leave it outMission 6 of 16Locked. Choose between >, >= and ==, then test the exact limit.
  3. Combine conditions without changing the ruleMission 7 of 16Locked. Build an and/or rule with explicit grouping and test exceptions.
Unit 3

Loops and running totals

Repeat useful work and explain when repetition stops.

  1. Repeat a group of instructionsMission 8 of 16Locked. Identify the loop body and count executions separately from labels.
  2. Keep the total between repetitionsMission 9 of 16Locked. Start a running total before the loop, then add each new contribution.
  3. Repeat until a condition changesMission 10 of 16Locked. Choose a stopping condition and repair a loop that cannot end.
Unit 4

Functions: reusable instructions

Define, call and combine small functions with clear inputs and outputs.

  1. Name a reusable set of instructionsMission 11 of 16Locked. Distinguish defining a function from calling it.
  2. Give a function inputs; get a resultMission 12 of 16Locked. Trace parameters, local names and a returned value.
  3. Build and combine small functionsMission 13 of 16Locked. Write a small function and pass its result into another function.
Unit 5

Plan, build and debug

Turn a small problem into a program and check that it meets its requirements.

  1. Plan a small program before writing itMission 14 of 16Locked. Turn a requirement into inputs, outputs and an ordered algorithm.
  2. Find the first wrong stepMission 15 of 16Locked. Construct, test and repair a short program using ordinary and boundary cases.
  3. Build a ticket-order programMission 16 of 16Locked. Combine input, copies, decisions, totals and functions in one tested solution.Mastery Challenge

A Debsie Course · beginner