You will write the error reports of a toy interpreter and a toy compiler. A line can be translated when Python's compile accepts it. The helper can_translate is written for you.
Your tasks.
interpreter_stops_at: the number of the first line that cannot be translated, or None if every line can.compiler_errors: the list of the numbers of every line that cannot be translated.lines_run to the number of lines the interpreter translates and runs for program before it stops.Line numbers start at 1.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…