Exercise One
1. Harold is five steps away from his cat Ginger, who is an unknown distance away from a chair, as
illustrated in figure 1-8, using only the instruction listed in the figure, create an algorithm that
directs Harold to step over Ginger and sit in the chair. You may use an instruction more than once, in
the repeat (x times) instruction, replace x with the appropriate number of times you want to the loop
instruction(s) repeated. Be sure to indent the instruction appropriately.
end repeat
repeat(5 times)
repeat until (you are directly in front of the chair)
sit down on the chair
step over Ginger
turn left go degrees
walk forward one complete step