(1) Here is a maze that combines parts of 3 squares. All measurements are in centimeters.
The outer section has 12 cm sides. The middle section has 8 cm sides and the inner-most section has 4 cm sides.
Each of the partial squares can be drawn using Repeat Loops in Pro-Bot, as we saw in our previous assignment. Can you write a program for Pro-Bot to draw this figure?
Your program will have three sets of Repeat Loops as well as other instructions in between. So far, all of the programs that you wrote for Pro-Bot used either a sequence of simple instructions or stand-alone Repeat Loops. This is a good example to see a mix of both in a program.
(2) This is a follow-up exercise to the above maze. All measurements are in centimeters.
The outer section has 12 cm sides. The middle section has 8 cm sides and the inner-most section has 4 cm sides. Each of the sections can be drawn using Repeat Loops in Pro-Bot, as we saw in our previous assignment.
Can you write a program for Pro-Bot to draw this figure?
Can you modify the previous program for the maze, adding just a couple lines of code, for Pro-Bot to draw this figure?
This is a good exercise in modifying or editing an existing piece of code to create a new functionality.
Here is a set of solutions.
The outer section has 12 cm sides. The middle section has 8 cm sides and the inner-most section has 4 cm sides.
Each of the partial squares can be drawn using Repeat Loops in Pro-Bot, as we saw in our previous assignment. Can you write a program for Pro-Bot to draw this figure?
Your program will have three sets of Repeat Loops as well as other instructions in between. So far, all of the programs that you wrote for Pro-Bot used either a sequence of simple instructions or stand-alone Repeat Loops. This is a good example to see a mix of both in a program.
(2) This is a follow-up exercise to the above maze. All measurements are in centimeters.
The outer section has 12 cm sides. The middle section has 8 cm sides and the inner-most section has 4 cm sides. Each of the sections can be drawn using Repeat Loops in Pro-Bot, as we saw in our previous assignment.
Can you write a program for Pro-Bot to draw this figure?
Can you modify the previous program for the maze, adding just a couple lines of code, for Pro-Bot to draw this figure?
This is a good exercise in modifying or editing an existing piece of code to create a new functionality.
Here is a set of solutions.
No comments:
Post a Comment