Question: 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
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 instructions 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 the loop instruction(s) repeated. Be sure to indent the instructions appropriately.
Figure 1-8

--? steps- .--5 steps---- end repeat repeat (x times) repeat until (you are directly in front of the chair) st down in the chair step over Ginger turn left 90 degrees walk forward one complete step
Step by Step Solution
3.47 Rating (160 Votes )
There are 3 Steps involved in it
1 repeat 5 times walk forward one complete step e... View full answer
Get step-by-step solutions from verified subject matter experts
