Environment Diagram Practice


Below are some practice problems for drawing environment diagrams. This page will be updated periodically as we cover more content related to diagramming. These are completely OPTIONAL, but are highly recommended as extra practice. Solutions for each problem can be found at the bottom of this page

Optional ED00 If-else and conditions

Given the code block below, draw an environment diagram paused after the print statement on line 5 is reached.

Optional ED01 Nested function calls

Given the code block below, draw an environment diagram paused after the print statement on line 3 is reached.

Optional ED02 Name resolution

Given the code block below, draw an environment diagram paused after the print statement on line 7 is reached.

Optional ED03 Tuples

Given the code block below, draw an environment diagram paused after the print statement on line 9 is reached.

Optional ED04 List Traversal

Given the code block below, draw an environment diagram paused after the main function finishes running on line 27.

Optional ED05 Classes and Objects

Given the code block below, draw an environment diagram paused after the main function finishes running on line 27.

Optional ED06 Recursion

Optional ED07 Linked Lists

Solutions

ED00

ED01

ED02

ED03

ED04

ED05

ED06

ED07