Checkpoint

Checkpoint: Harbour Notice

The harbour master wrote a notice for tonight's lantern crew. Sadly, the program has three problems. Fix them all and the notice will shine across the harbour!

This checkpoint uses everything from this chapter: print lines, comments, fixing a SyntaxError, and letting Python do the math.

Here is a reminder of how math works inside print:

print("2 + 3")   # 2 + 3  (quotes: just text)
print(2 + 3)     # 5      (no quotes: Python calculates)

Assignment

  1. Line 3 is missing a quote. Fix it.
  2. Replace ___ on line 5 with 14 + 10, so Python works out the number. Use no quotes!
  3. Line 6 is a plain-English note. Turn it into a comment with #, but keep its words.

The output should be:

=== Harbour Notice ===
Lanterns to light tonight:
24
Signed, Pip