Question: Exercise 1 (5 points) Rob, the mechanical man, can perform the following set of instructions: Walk forward Sit down Stand up Pick the flower with

Exercise 1 (5 points) Rob, the mechanical man,
Exercise 1 (5 points) Rob, the mechanical man, can perform the following set of instructions: Walk forward Sit down Stand up Pick the flower with the right hand Pick the flower with the left hand Drop the toy in the toy chest Turn right 90 degrees Jump over the box Throw the box out of the way If the box is red, do this: If the flower is white, do this: Otherwise, do this: Repeat x times: Repeat until he is directly in front of the chair Repeat until he is directly in front of the toy chest 5 steps steps Rob is five steps away from a box that is an unknown distance away from a chair. Using only the instructions shown above, write an algorithm that directs Rob to sit in the chair. Assume that Rob must jump over the box before he can continue toward the chair. Exercise 2 (5 points) The River Hotel needs a program that both calculates and displays a customer's total bill. Each customer pays a room charge that is based on a per-night rate ($99 per night )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!