← All sample lessons

Sample lesson · Computer Science · Grades 9-12

Building Blocks of Code

Intro computer science review deck on variables, data types, conditionals, loops, functions, and debugging, with short Python examples.

  • 23 questions
  • 5 categories
  • 10 games

The questions

Speak Code

  1. What do we call a step-by-step plan for solving a problem?AlgorithmEasy
  2. What do we call a set of instructions a computer follows in order?ProgramEasy
  3. What do we call one pass through a loop?IterationMedium
  4. What do we call joining strings together, like "2" + "3"?ConcatenationHard

Store It

  1. What do we call a named container that stores a value?VariableEasy
  2. x = 5, then x = x + 2. What is x?7Easy
  3. What data type is "hi", text inside quotes?StringMedium
  4. What data type has only two values, True and False?BooleanMediumBeyond the lesson
  5. In score = 10, what does the = sign do?Assigns a valueHard

Decide and Repeat

  1. What do we call code that runs only if something is true?ConditionalEasy
  2. How many times does for i in range(3) run?3Easy
  3. Which operator compares two values for equality?==Medium
  4. Which loop repeats as long as a condition is true?While loopMedium
  5. What do we call a loop whose condition never becomes false?Infinite loopHard

Reuse It

  1. What do we call a named, reusable block of code?FunctionEasy
  2. In def greet(name):, what is name?ParameterMedium
  3. In greet("Sam"), what is "Sam"?ArgumentMedium
  4. Which keyword sends a value back from a function?returnHard

Squash It

  1. What do we call an error in a program?BugEasy
  2. You forgot the colon after if x > 0. What kind of error is that?Syntax errorMedium
  3. Your program runs but prints the wrong average. What kind of error is that?Logic errorMedium
  4. What do we call explaining your code out loud to find a bug?Rubber duck debuggingHard
  5. Whose team found a real moth in a computer in 1947?Grace HopperHard

Plays in

Make one from your own lesson.

Upload a lesson plan, worksheet, or slide deck, and Bellwork writes questions like these for you to check.