Step 20: Another Rainy Day

  • CS20-CP1 Apply various problem-solving strategies to solve programming problems throughout Computer Science 20.
  • CS20-CP2 Use common coding techniques to enhance code elegance and troubleshoot errors throughout Computer Science 20.
  • CS20-FP2 Investigate how control structures affect program flow.


For the following challenge, you will need to put to use much of the knowledge you have gained in the previous steps. You may find that it is helpful to look back to your solution for Step 15.

Open Step 20 on the Reeborg environment.


Reeborg needs to move around the room and close the windows by using the build_wall() function, but this time the room will not be rectangular. The shape of the room, size of the room, and the location of the windows are always changing.

To help you get started with this problem, consider the following question. Imagine that Reeborg is standing next to a wall, takes a single step, and finds that there is no longer a wall next to him. What can happen if Reeborg takes another step? Hint: there are two possible cases.

Next Section - More Challenges