Syntax, static semantics, and runtime semantics — three reasons your program can fail, only one of which the interpreter catches before you run it.
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
The video introduced an operator that takes a string on one side and a number on the other and produces a longer string of repeated copies.
The primitives "hi" and 5 are given as text and copies. Build the five-copy string and assign it to laugh.
Primitives and syntax, with the English parallel
Pair English words and word-order rules with Python numbers, character sequences and operators, then record "hi" 5 as invalid against "hi" * 5, which produces hihihihihi.
Static semantic errors
Write "hi" + 5 as the example that satisfies the syntax rule yet carries no meaning, put the sentence "I are hungry" beside it, and label the error static semantic.
Exactly one meaning per program
Set the two readings of "The chicken is ready to eat" against the rule that a program has a single meaning, which may differ from the one intended.
The three ways a wrong program behaves
List crashing immediately, running forever without stopping, and terminating with an incorrect answer, and mark which of the error kinds are easy to catch and which are hardest.