Note: I am not an official teacher or GSI for any of the courses listed on this site unless otherwise stated. Any problems and notes are created from my own observations and may not accurately reflect the course's content.

Environment Diagrams #2

Draw an environment diagram that results from executing the code below until the entire program is finished or an error occurs.

A complete answer will:

  • Add all names and parent annotations to all local frames.
  • Add all values created or referenced during execution.
  • Show the return value for each local frame.

Have a question? Found an error? Email me at imran.khaliq@berkeley.edu with the URL of the page and a short description.