Answer it
When the error appears, interpreted or compiled
4 marksYou mark it yourself against the marking points
Two students each write a 60-line program that first prints a welcome message, then calculates bus fares. On line 40 both programs use a variable whose name is misspelled, so it has never been declared or given a value.
- Leo's program is in Python and is run with the standard interpreter. It prints the welcome message and some fares, then stops with an error at line 40.
- Aya's program is in Java. The compiler reports an error at line 40, and nothing is printed at all.
Explain why the two students see the error at different times. [4]