ica-cp: 9/26/08 - Creating Karel the Robot algorithms
Good morning!
Your Karel the Robot assignments #1-4 are due by the end of class today.
We will spend a few minutes deriving algorithms for your next few Karel the Robot assignments.
From tutorial #9:
Assignment 5: Write a Karel program to move to the corner of 0th Avenue and 0th Street, and turn off, assuming he starts at the corner of 14th Avenue and 0th Street, is facing west, and that obstacles may be in the way. The obstacles are walls that block 0th Street but do not extend east, north, or west. To get around an obstacle, Karel may turn right, move to 1st Street, turn left, move to the next lower numbered avenue, turn left, move again to get back to 0th Street, and turn right to continue his journey. Keep in mind that 1st Street may have some walls too, but they don't connect to the obstacles on 1st Street. (Hint: use an iterate and an if/else.)
0 Comments:
Post a Comment
<< Home