Connect with a global community of experts on IDNLearn.com. Ask your questions and get detailed, reliable answers from our community of knowledgeable experts.
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
Sagot :
Thank you for contributing to our discussion. Don't forget to check back for new answers. Keep asking, answering, and sharing useful information. Discover the answers you need at IDNLearn.com. Thanks for visiting, and come back soon for more valuable insights.