Showing posts with label Stairs. Show all posts
Showing posts with label Stairs. Show all posts

Monday, July 28, 2014

Solutions: Repeat Loops in Pro-Bot Assignment 1

Here is a set of solutions to the Repeat Loops Assignment 1.  The Start point is marked in each figure. Pro-Bot is assumed to be facing forward at the starting position.




1.  Repeat Loops Pattern 1

     Rpt 3 [
     Fd 6
     Rt
     Fd 6
     Lt
     ]



2.  Repeat Loops Pattern 2

 
     Rpt 2 [
     Fd 6
     Rt
     Fd 6
     Rt
     Fd 6
     Lt
     Fd 6
     Lt
     ]



3.  Repeat Loops Pattern 3

   
     Rpt 3 [
     Fd 6
     Rt
     Fd 6
     Rt
     Fd 12
     Lt
     Fd 6
     Lt
     Fd 6
     ]

Repeat Loops in Pro-Bot: Assignment 1

(1)  Using Pro-Bot, trace the pattern for a set of stairs that looks like the following. Each step is 6 cm tall and 6 cm wide. Do you see a pattern in this figure that keeps repeating? Circle the repeating pattern. Can you write a program for Pro-Bot to draw this pattern using Repeat Loops? Assume Pro-Bot is facing forward starting at the base of the steps.





(2)  Using Pro-Bot, trace the following pattern. Each side of the figure measures  6 cm each.  Do you see a pattern in this figure that keeps repeating? Circle the repeating pattern. Can you write a program for Pro-Bot using Repeat Loops to draw this pattern? Assume Pro-Bot is facing forward at the start point on the left end.







(3)  Using Pro-Bot, trace the following pattern. Each short side of the figure measures  6 cm each. The longer sides are 12 cm each. Do you see a pattern in this figure that keeps repeating? This is a bit more tricky than the previous two figures. Circle the repeating pattern that you identified. Can you write a program for Pro-Bot using Repeat Loops to draw this pattern?