15-110 Principles of Computing - Summer Two 2014

Lab 1 - Monday, June 30


IMPORTANT RULES FOR ALL LABS

In order to receive credit for lab, you must attend your lab section and submit your work during that lab. You cannot attend another lab section, and you cannot submit from elsewhere (e.g. your dorm room). We want you to go to lab since you will get additional information from your course assistant that will help you, and you will be able to work with other students to share ideas and learn how to solve problems more effectively. It is also important to go to lab and use the Linux machines since your lab exams will be run on these machines so you need to familiarize yourself with this environment.

If you go to a different lab section or submit the work early or late, you will receive a 0. You are allowed to drop 2 labs without penalty, so please do not ask for makeups. Look ahead at your schedule to see if you will be missing a lab due to another event and plan on dropping that lab. If you drop a lab, you are still responsible for reviewing the material covered. (Note: You must be in attendance for lab exams. Lab exams cannot be dropped.)


CA Demontration


In this lab, you will review how to play Lightbot 2 and solve a few puzzles. For each solution, you will learn how to write your solution as a "program" in a text file using some formatting rules given in class.

  1. Review the rules for Lightbot 2 and the procedure for formatting your answers as a text file. (Right-click HERE and choose "Open link in new window" or "Open link in new tab" to get a copy of the Lightbot reference page.)

  2. Solve the following puzzles by playing them in LightBot 2. For each puzzle, once you have a solution, create a text file that contains your solution formatted based on the rules shown on the LightBot page that you opened in step 1. Your CA will show you how to create a text file on the machines in the Linux lab. Create a separate file for each puzzle using the file names puzzle1.txt, puzzle2.txt, and puzzle3.txt. You are expected to solve the first two puzzles. The harder third puzzle is there for those who finish early. For each text file you create, run the Python-based format checker to see if you formatted your file correctly. See the Lightbot reference page for more information.

    1. Play puzzle1 online and save your solution in puzzle1.txt

    2. Play puzzle2 online and save your solution in puzzle2.txt

    3. Play puzzle3 online (HARDER) and save your solution in puzzle3.txt

Submit Your Lab Work

Create a zip file called lab1.zip that contains your text files, and submit it for grading using the handin instructions. Be sure that you create a zip file and not a compressed file in another format.