15-110 Principles of Computing, Summer 2017

Programming Assignment 1

Example

As an example, this is what a zombie maze puzzle will look like at the very start. The goal is to drag the commands together in an attempt to guide the zombie to his destination.

Once you have completed and tested your solution to ensure the zombie has reached its destination, the puzzle will look something like this.

After figuring out the solution, a popup will appear on the screen. Make sure to click "Show Code". This is what will be submitted in the final solution file. For each puzzle, copy and paste the solution into a file with the name specifically outlined in the directions. . Please make sure that your browser shows all the code that you need to copy. We recommend that you do not use Safari in this assignment since you may run into issues with copying all of your code.

This is what it should look like when you click on "Show Code"

The following text is what you should be copying and pasting into your text editor when you save your files and submit your assignment:

while (notFinished()) {
  moveForward();
  turnLeft();
  moveForward();
  turnRight();
}

Once you have the code solution, you can then save the file as example.txt or whatever filename is specified by the directions.