STEP 6: Now we're ready to add to create_maze()! Let's start by doing some math.

  • This function will be dynamic. It'll calculate how many squares to create and where to place them.
  • We'll need the length of our 2D list. In , drag Get Length of List inside create_maze().
  • Then, change the variable to the left of the = sign from my_var to number_of_rows.
  • Finally, change the variable inside the ( ) from my_list to maze.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)