Programming Assignments

 Chapter 1 Test: Thursday 9/21

Unit I: Introduction to Karel J. Robot

Phase I: These programs are worth 40 points

Title

Description

Due Date

Simple Move

In the preset Karel world with no additional objects, instantiate a single robot at location (1,1) and write code so that it moves to location (4, 7)

Wednesday 9/13

Pick Up Beeper

In the preset Karel world, add a beeper at location (3,4).  Instantiate a single robot at location (1,1) which moves to pick up the beeper and moves at least one square past the beeper after picking it up.

Thursday 9/14

Pick up and Return

Using the same world as the last one, place a beeper at (6, 3).  Instantiate a single robot at (9, 9) and pick up the beeper as placed and return to the starting location.

Friday 9/15

Pick and Place

In the preset Karel world, add a beeper at location (5, 5).  Instanciate a single robot at location (1, 1).  The robot should pick up the beeper, move it to (3, 5) and place it down at that location and then continue to move back to its starting location.

Monday 9/18

Mountain Climb

The wall sections shown in the picture represent a mountain (north is up).  Program karel to climb the mountain and then plant a flag, represented by a beeper, on the summit; karel then must descend to the other side of the mountain.  Karel must follow the shape of the mountain both up and down and start with a beeper in his bag already.

Tuesday 9/19

 

Phase II: These parts are worth 10 points each

 

Title

Description

Simple Move

Instantiate a second robot that uses a different pattern to move to the same location.  Both robots should move together in the program.

Pick up Beeper

Create a second beeper in the Karel world.  Have the robot retrieve that beeper as well.

Pick up and Return

Create a second beeper and robot.  The second robot should start at (1,1).  The robots each should pick up one beeper and return to the OTHER robots starting position.  Make the robots different colors when creating them.

Pick and Place

Start with at least 4 beepers in the bottom row of the world.  The robot should pick up the beepers and place them in a pattern within the world.

Mountain Climb

Create a larger world with more than one mountain and have Karel climb all the mountains and place beepers on each.