Skip to main content

Section 16.8 Review - Statements

Practice distinguishing between different types of statements and understanding what each line of code does.

Subsection 16.8.1 Part A: Recognize

Checkpoint 16.8.1.

Label each code example as one of the following: assignment statement, function call statement, conditional statement, loop statement, or expression.
  1. x = 5
  2. print("Done")
  3. if score > 70:
  4. for num in numbers:
  5. x + 2

Subsection 16.8.2 Part B: Explain

Subsection 16.8.3 Part C: Fix

Checkpoint 16.8.3.

Reorder the following lines so they form a logical program that runs without errors.

Subsection 16.8.4 Part D: Create

Checkpoint 16.8.4.

Write a 4-line program that displays a message that includes a person’s name and age. The program must create the following variables name, and age, and then create the variable message using name and age, and then prints the message.

Subsection 16.8.5 Think About ...

Checkpoint 16.8.5.

Why is it important for program statements to appear in the correct order?
You have attempted of activities on this page.