Showing posts with label Squares. Show all posts
Showing posts with label Squares. Show all posts

Sunday, August 17, 2014

Nets of 3D Shapes Part 1- Cubes: More practice with Procedures using Pro-Bot

This programming assignment is intended to provide more practice with Procedures using Pro-Bot. We shall use a Procedure to store the program for a square. We shall then write programs for Pro-Bot to draw nets of a 3-Dimensional object, a cube in this case, using the Procedure. 


Computer Science concepts involved:   Sequential programming, Repeat loops, Nested Loops, Procedures

Math concepts involved:   Cubes; Nets of 3D objects: visualizing cubes on a 2D plane, identifying multiple nets per cube, properties of nets of a cube; Squares, Measurement, Angles

Material required:  Card paper/thin cardboard to draw the nets on

Extension activity:   Make the cube by cutting out the net from the card paper and folding along the edges 

Grade levels:   3, 4

Hours required:   2 (or more)


Nets of 3-Dimensional Figures


A 3-Dimensional (3D) shape is a shape that has length, width and depth. They are also called solid figures or solid shapes. The length, width and depth are the three dimensions. Most of the objects that we see around us are 3-Dimensional. For example: your books, school bag, a box of crayons, Pro-Bot, table, chairs, water bottle, soccer ball, even yourselves are all 3D shapes.

How do these shapes differ from 2-Dimensional (2D)  figures, like the ones that you draw on paper? Think about how a cube or a sphere differs from a square or a circle drawn on paper. Well, the difference is that they have depth, unlike the 2D figures drawn on paper, which have only length and width. 3D shapes do not lie flat on a plane surface and they are difficult to draw on a piece of paper. 

But what if we could open up the 3D shapes and lay them out flat on paper? This would show us exactly how these solid shapes are made. A net can help us convert a 3D shape to a 2D figure. Nets are the flattened shapes of 3D objects. The net shows every edge and every face of the 3D figures laid out flat on paper. The net has only length and width; it does not have depth. It makes it easier for us to study and analyze some of the properties of a 3D object. You can cut out the net from the paper and fold it along the edges to create the 3D object. The same 3D object may be flattened into more than one net.

Let’s look at a very common 3D shape, a cube, and draw its nets. We shall use Pro-Bot to draw the nets on thin cardboard. You can then cut out the nets and fold them to create the 3D object.


Nets for a Cube


Have you seen the dice that you use for board games? It has the shape of a cube. A cube is one of the most common 3D figures, with 6 square faces, 12 edges and 8 vertices. 

What would the cube look like if you cut it open along some of its edges and laid it out flat on a piece of paper, so that you can see every face and every edge? The flattened version of the cube would be its net. There can be more than one net for a given 3D shape. Can you guess how many nets exist for a cube?

In the figure below are a couple of nets for a cube of sides 6 cm each. 




















You can see from the figure that each net is made up of multiple squares; each square representing a face of the cube. All the squares are similar, with edges measuring 6 cm each. If you fold the above nets along the edges/lines drawn in the figure, you would end up with a cube.



Programming Assignment


  1. Write a program to draw a 6 cm side square. Remember to use Repeat Loops in your program for the square. Store your program as a Procedure.   (Since the same square is used multiple times in each net, it would be easier for you as the programmer, to write the program for the square just once, store it in a Procedure and then call that Procedure from your main program whenever you need it.) 
  2. Write the programs for Pro-Bot to draw the nets for the cube as given in the figure above. Use the Procedure for the square that you previously wrote while writing the programs.
  3. There are 11 possible nets for a cube, two of which are given above. Can you identify the other 9 nets for the cube as well? 
  4. Write a program for Pro-Bot to draw each net that you identify, using the Procedure for the square in your program.
  5. Once you are done drawing each net using Pro-Bot, cut out the nets from the paper. Fold the paper along the lines drawn and create a cube from each net.You could even draw the numbers/dots on the six squares as seen on a pair of dice. 
  6. List the properties that seem to be common for the various nets that you came up with.
  7. Compare the area and perimeter of the different nets. 



Sunday, August 10, 2014

Solutions: Modular Programming with Squares on Pro-Bot

This is a subset of solutions for the assignment Modular Programming with Squares. This is just one way of coding the solutions, there are multiple correct solutions for the same.


Breaking Down Squares


1.  The shape is a square. It can drawn using the code:
Rpt 4 [    
Fd 12
Rt
]




2.  The above square needs to be divided into two equal parts. You can do this with a horizontal or vertical line across the middle or divide the square along the diagonal. The solution below divides the cake along the horizontal line
across the middle.
Rpt 4 [
Fd 12
Rt
]
Fd 6
Rt
Fd 12

3.  The square now needs to be divided into quarters. Two possible solutions, along the diagonals or using horizontal & vertical lines. The solution below divides the cake along the horizontal & vertical lines.
Rpt 4 [
Fd 12
Rt
]
Fd 6
Rt
Fd 12
Bk 6
Lt
Fd 6
Bk 12

4.  Here is another way to divide the cake into quarters, along the diagonals.
Rpt 4 [
Fd 12
Rt
]
Rt 45
Fd 17
Lt 135
Fd 12
Lt 45
Bk 17

5.  You need to divide the 12 x 12 cake into 9 equal pieces in this case.  Each slice is going to be 4cm x 4 cm.  Here is a solution using Nested Loops.
Rpt 4 [
Fd 12
Rt
]
Rpt 2 [
Rpt 2 [
Fd 4
Rt
Fd 12
Bk 12
Lt
]
Fd 4
Rt
]


Building Up with Squares as the Basic Building Blocks


1.  The square can be drawn using the code:
Rpt 4 [
Fd 6
Rt
]

2.   Here is the code for the rectangle drawn without using Nested Loops:
Rpt 4 [
Fd 6
Rt
]
Fd 6
Rpt 4 [
Fd 6
Rt
]
Fd 6
Rpt 4 [
Fd 6
Rt
]

3.  As seen from the code above, there is a repeating pattern. After drawing each square, you need to move to the starting position for the next square. The above code can be rewritten using Nested Loops as:
Rpt 3 [
Rpt 4 [
Fd 6
Rt
]
Fd 6
]


4. & 5.  To draw the large square that is double the size of the small square, different techniques can be employed. The easiest is to start from the midpoint of the figure. Each time, draw the small square and then turn 90 degrees to the right. Here is the code that uses Nested Loops.

Rpt 4 [
Rpt 4 [
Fd 6
Rt
]
Rt
]


Solutions to the Hopscotch figure:















Rpt 3 [      // Start drawing the rectangular part of the hopscotch from bottom left corner
Rpt 4 [
Fd 6
Rt
]
Fd 6
]
Rt             // Here, you want to try and get to the midpoint of the large square
Fd 3         // 3 cm from the top of the rectangle to the midpoint of large square
Lt
Fd 6         // You have reached the midpoint of the large square now
Rpt 4 [     // Now draw the large square using the previously written code for the same
Rpt 4 [
Fd 6
Rt
]
Rt
]

Breaking Down & Building Up: Modular Programming with Squares on Pro-Bot

We have already worked on drawing squares using Pro-Bot. We used Repeat Loops to create a square in our previous assignment here

Now, let’s work a bit more with squares, first breaking it down into smaller parts and then building up compound figures using squares as our basic building blocks.


Computer Science concepts involved:   Sequential programming, Repeat loops, Nested Loops, Modular programming

Math concepts involved:   Polygons (squares, rectangles), Measurement, Fractions, Compound figures, Angles

Grade levels:   3, 4, 5

Hours required:   2 or more


Breaking Down Squares

1.   You have spent your Sunday afternoon at home baking a delicious chocolate cake. You baked the cake in a square pan that measures 12 cm long on each side. What shape is your cake when you look at it from above? Can you draw this shape using Pro-Bot? 
2.   You plan to share the cake with 2 of your friends. You cut the cake into equal parts for yourself and your friends. Using Pro-Bot can you draw a figure to represent your cake and how you would cut it? What fraction of the cake would each person get? 
3.   One more friend comes along. So, you decide to cut the cake into equal parts for yourself and your 3 friends. Using Pro-Bot can you draw a figure to represent your cake and how you would cut it? What fraction of the cake would each person get now? 
4.   How many different ways can you think of to cut the cake into 4 equal parts? Using Pro-Bot, draw figures to represent each case. What shapes are the fractions in each case? 
5.   Your friend says that a single serving of cake should be no larger than 4 cm x 4 cm in size. How would you cut the cake to get slices of this size? Using Pro-Bot, draw a figure to represent your cake and how you would cut it in this case.  How many pieces can you cut the cake into?


Building Up with Squares as the Basic Building Blocks


1.   Use Pro-Bot to draw a square of sides 6 cm each. (Remember to use Repeat Loops for drawing the square).

2.   Now, let’s create a rectangular shape with the following dimensions, using the above 6 cm square as our building block:  
Length  =  3 x length of one side of the square 
Width  =  length of one side of the square 

Can you write a program for Pro-Bot to draw this figure, using the program for the 6 cm side square that you wrote earlier? 

























  

3.   Can we use Nested Loops to draw the above figure? Explain why.

4.   Next, let’s create a bigger square with the following dimensions:       
Side of big square  =  2 x Side of the 6 cm square

Can you write a program for Pro-Bot to draw this figure, using the program for the 6 cm side square that you wrote earlier? 



















5.   Can we use Nested Loops to draw the above figure? (Tip: It is easier to start drawing from the midpoint of the figure while using Nested Loops.)


Here is a set of possible solutions to the above assignments.


Modular Programming


From the two examples above, you can see how a small module that performs one distinct function (in this case, our program to draw the 6 cm side square) can be used to build bigger components. The big components that we created in turn can work as modules for an even bigger program. 

This activity provides a quick peek into modular programming, a principle that is widely used in most programming languages. Modular programming is the process of dividing a program into smaller, separate sub-programs. 

Let's look at an example that is familiar to you. Do you play with Lego construction sets? A lot of times, when you buy Lego sets, the box comes with several small bags inside of it, each labeled with a number. There will be an instruction booklet that tells you how to use the tiny pieces inside each bag to create a small component of the big toy that you plan to make. Once you have created a couple of such components from the different bags, the book tells you how to put them together to create a slightly bigger unit... and the process goes on till you get to the completed product... 

Just like you build large Lego toys using multiple smaller units, each of which in turn was made of still smaller pieces, we can build large programs using smaller components or modules, which in turn can be made of even smaller modules.

So, why do we prefer to use modular programming rather than develop one giant program? Here are some reasons...

  • Reusing the code. You write a module just once, but it can be used multiple times by different programs. In the above examples, you wrote the code for the 6 cm side square just once, but you used it multiple times while developing two different programs. 
  • Breaking up the program into smaller modules makes it easier to maintain the program. For example, if you decide to change the larger programs to be using 10 cm side squares, all you need to do is make one change in your smallest module for the square from 6 cm to 10 cm. The change is easily reflected in all the bigger modules that use it. 
  • It is easier to find and fix errors in smaller modules. 
  • Smaller modules ensure that the code is short, simple, easy to read and understand.
  • It makes it easier for different people to develop different modules independent of each other. You could have one person write the program for the 6 cm square, another person write the program for the rectangle using the 6 cm square and yet another person write the program for the bigger square. And then, all of these could be put together to create an even bigger program as seen below...


1.   Elmo and his friends are planning to play hopscotch. Elmo suggests a figure that looks like the following and draws it out using Pro-Bot. Each square in this hopscotch figure has 6 cm sides. Can you write a program for Pro-Bot to draw this figure? Can you re-use the programs that you wrote above to draw this figure?





















  • You can also store each of the programs that you wrote above (for the rectangle and the big square) as separate Procedures and call them from your Main program for Pro-Bot to draw the hopscotch figure.




A Different Approach to the above Program



If you have an even number of students/ groups working on this project, you could try the following exercise with the hopscotch figure:

  • Divide the class into an even number of teams, so that each team pairs with another.  Let’s call the teams in each pair as Team A & Team B.
  • Team A in each pair would create the procedure for the big square. Team B in each pair would create the procedure for the large rectangle.
  • The pairs then exchange the Pro-Bots.
  • So now, each team has the procedure that they created themselves plus the procedure that was created by the other team. They do not need to know how the other team created their procedure;  they just need to know what it does (a black box).
  • Each team shall give clear instructions to their partner team as to how their procedures work. They can even draw a picture to show what their procedure would create, specifying the start & end points, and give it to the other team.
  • Each team now integrates the procedures/modules (their own work + the other team’s work) to create the required final result & test it.
  • This could be a good activity to introduce the kids to the concepts of real world engineering projects: division of work among different teams, testing & integration of results.



Friday, August 1, 2014

Drawing Polygons using Pro-Bot given Area or Perimeter

In this programming assignment, we shall draw polygons using Pro-Bot, given the area or perimeter of the polygons. Your first task is to figure out the dimensions of the polygons from the given data and your second task is to write programs to draw the polygons using Pro-Bot. You can use either sequential programming or Repeat loops to draw the polygons, depending on whether they are irregular or regular.

Computer Science concepts involved:  Sequential programming, Repeat loops

Math concepts involved:  Polygons (regular and irregular), Area, Perimeter, Measurement, Angles

Grade levels:  4, 5

Hours required: 3 - 4


Draw Polygons using Pro-Bot given the perimeter:

  1. The perimeter of a regular, 4 sided polygon is 32 cm. The interior angles are all 90 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  2. The perimeter of a regular, 4 sided polygon is 32 cm. A pair of opposite interior angles are 60 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  3. The perimeter of a regular 3 sided polygon is 18 cm. The interior angles are all 60 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  4. The perimeter of a 3 sided polygon is 24 cm. The interior angle between the shortest sides is 90 degrees. The interior angle between the shortest and longest sides is 54 degrees. The sum of the lengths of the shortest sides is 14 cm. The difference between the lengths of the shortest sides is 2 cm. What kind of a polygon is it? Can you write a program for Pro-Bot to draw this polygon? 
  5. The perimeter of a 4 sided polygon is 24 cm. Two of its sides are parallel to each other and the other two are not. The sides that are not parallel are equal in length. Both the angles coming from a parallel side are equal: the pair of angles coming from the longer parallel side is 54 degrees each and the pair of angles coming from the shorter parallel side is 126 degrees each. The sum of the lengths of the parallel sides is 14 cm. The shorter of the parallel sides is 4 cm. Can you identify the polygon? Can you write a program for Pro-Bot to draw this polygon?
  6. The perimeter of a 4 sided polygon is 24 cm. Both sets of opposite sides are parallel. What kind of a polygon do you think it is? The ratio of the shorter side to the longer side of this polygon is 1/2; i.e.; each shorter side is half the length of the longer side. One pair of interior opposite angles is 60 degrees and the other pair of interior opposite angles is 120 degrees. Can you write a program for Pro-Bot to draw this polygon?
  7. The perimeter of a 5 sided regular polygon is 25 cm. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it? What is the value of each interior angle?

Drawing Polygons using Pro-Bot given the area:


  1. The area of a regular, 4 sided polygon is 24 square cm. The interior angles are all 90 degrees each. Can you write a program for Pro-Bot to draw this polygon? What kind of a polygon is it?
  2. The area of a 4 sided polygon is 24 square cm. The opposite sides are equal in length and the interior angles are all 90 degrees each. The longer side measures 2 cm more than the shorter side. The sum of the lengths of the long side and the short side is 10 cm. Can you write a program for ProBot to draw this polygon? What kind of a polygon is it?
  3. The area of a 3 sided polygon is 24 square cm. The interior angle between the shortest sides is 90 degrees. The interior angle between the shortest and longest sides is 54 degrees. The sum of the lengths of the shortest sides is 14 cm. The difference between the lengths of the shortest sides is 2 cm. What kind of a polygon is it? Can you write a program for ProBot to draw this polygon? 
  4. The area of a 4 sided polygon is 24 square cm. Both sets of opposite sides are parallel to each other. What kind of a polygon is it? The distance between the longer parallel sides is 4 cm. The perimeter of this polygon is 20 cm. One pair of interior opposite angles is 60 degrees and the other pair of interior opposite angles is 120 degrees. Can you write a program for ProBot to draw this polygon?

Thursday, July 31, 2014

Solutions: Drawing Polygons using Pro-Bot

Here is a subset of the possible solutions for drawing the polygons in this assignment. Please keep in mind that there are multiple correct ways of programming each of these figures.


The following programs draw the polygons without using Repeat Loops.

1. Square of sides 8 cm:
Fd 8
Rt
Fd 8
Rt
Fd 8
Rt
Fd 8
2. Rectangle 4 cm x 6 cm: 
Fd 4
Rt
Fd 6
Rt
Fd 4
Rt
Fd 6
3. Parallelogram 4 cm x 6 cm:
Fd 4
Rt 45
Fd 6
Rt 135
Fd 4
Rt 65
Fd 6
4. Rhombus 6 cm:
Fd 6
Rt 60
Fd 6
Rt 120
Fd 6
Rt 60
Fd 6
5. Equilateral Triangle of sides 6 cm:
Fd 6
Rt 120
Fd 6
Rt 120
Fd 6 
6. Right Triangle of sides 3 cm, 4 cm, 5 cm:
Fd 3
Rt 126
Fd 5
Rt 144
Fd 4 


Drawing Regular Polygons using Repeat Loops in Pro-Bot


All of the regular polygons below have sides of 6 cm.

1. Equilateral Triangle
Rpt 3 [
Fd 6
Rt 120
]
2.  Square
Rpt 4 [
Fd 6
Rt 90
// You can also use the instruction "Rt", instead of "Rt 90" in the code above,                                           // as the default turn is 90 degrees for Pro-Bot.
3. Pentagon
Rpt 5 [
Fd 6
Rt 72
]
4. Hexagon
Rpt 6 [
Fd 6
Rt 60
]
5. Octagon
Rpt 8 [
Fd 6
Rt 45
]
6. Nonagon
Rpt 9 [
Fd 6
Rt 40
7. Decagon
Rpt 10 [
Fd 6
Rt 36
]



A Circle using a Repeat Loop

Rpt 360 [
Fd 1                 // Move 1 cm
Rt 1                 // Turn 1 degree
]

An Algorithm for Drawing Regular Polygons using Repeat Loops 


From the pieces of code above for various regular polygons, the relation between the number of sides of a regular polygon and the angle of turn can be deduced to 360/N where N is the number of sides of the polygon.

The generalized algorithm for drawing regular polygons is:
Rpt N [
Fd X
Rt 360/N
]
where N is the number of sides of the regular polygon, X is the length of each side of the polygon.  



Wednesday, July 30, 2014

Solutions: Procedures: Revisiting Squares

The Procedures in Pro-Bot are pre-named from Proc1 to Proc32.


1.  Let's write the program for the square and store it in a procedure called Proc1. Access the New Proc or Edit Proc options from the Menu button to access the procedures and  choose Proc1. Here's what Proc1 might look like:

// Remember that you would see Proc1 as the first line on the screen here, not Main.

   Rpt 4 [
   Fd 6
   Rt
   ]


// To run this Procedure, go back to Main by clicking on the Menu button. Call Proc1 from Main using the Proc key and the number 1 on the control pad. Then press Go and watch your Procedure execute.



2.   Here is one way to use Proc1 from the above program to draw the stack of squares.

     Rpt 3 [
     Proc 1
     Fd 6
     Rt
     Fd 6
     Lt
     ]





3.   To draw the coaches for the train using Proc1, you could use the following code:
   
    Rpt 3 [
    Proc 1
    Rt
    Fd 8
    Lt
    ]

Procedures: Revisiting squares

The following programs are intended to provide practice with writing procedures in Pro-Bot, storing them in Pro-Bot's memory and calling them.


(1)  Write a program for Pro-Bot to draw a square of sides 6 cm. Store this program as a procedure on Pro-Bot (say proc1). Now call this procedure (proc1) from Main to test and see if Pro-Bot draws a 6 cm square.



(2)  Now that you have your program for drawing a 6 cm square stored in Pro-Bot's memory, any time you want to use it, you can call it either from your Main program or from another procedure.
You may recall the figure below from the Nested Loops assignment.




















Can you use the procedure that you have in Pro-Bot's memory to draw the above figure now? Rewrite your previous program for Pro-Bot to trace this figure, using the procedure for the square.




(3)   Let's revisit the Trains project from Nested Loops. Can you rewrite your previous program for Pro-Bot to draw the coaches of the train using the above procedure?




















In all of the projects above, you can see that you did not have to write the code for the square anew each time. All you had to do was write the program for the square once, store it as a procedure and then call the procedure any time you needed its functionality. You were able to use the same procedure for different programs.


Here is a set of solutions.

Solutions: Debugging

1.  The program to trace the number 2 has bugs in instructions & data.

   Fd 6
   Rt
   Fd 6
   Rt
   Fd 6
   Rt          //Wrong instruction, Rt instead of Lt
   Fd 6
   Lt
   Fd 12    //Wrong data, 12 cm instead of 6 cm

Here is the program with the bugs fixed:

   Fd 6
   Rt
   Fd 6
   Rt
   Fd 6
   Lt      
   Fd 6
   Lt
   Fd 6  




2.  The missing square bracket for the Rpt instruction is a very common bug.

    Rpt 2 [
    Fd 6
    Lt
    Rpt 3 [
    Fd 6
    Rt
    ]
    Rt
    Rt
    // The closing square bracket is missing as the last instruction here.
    // Without it, the outer loop executes only once, not twice as intended.


Here is the program with the bugs fixed:

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



3.  A stack of squares, using a Nested Loop:  The given program has bugs in data, punctuation (missing square bracket) and missing instructions.

    Rpt 2 [     // Wrong data, need 3 squares not 2
    Rpt 5 [
    Fd 6
    Rt
    ]
    // Missing a few instructions here, as well as a closing square bracket for the outer loop.


Here is the program with the bugs fixed:

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



4.  A square of sides 6 cm divided into two equal parts: The given program has wrong data and wrong instructions.
   

    Rpt 4 [
    Fd 6
    Rt
    ]
    Fd 2     // Wrong data, need to move 3 cm to get to the midpoint 
    Rt
    Bk 6    // Wrong instruction, need Fd 6

Here is the program with the bugs fixed:
    Rpt 4 [
    Fd 6
    Rt
    ]
    Fd 3     
    Rt
    Fd 6    



5.  Three squares stacked on top of each other. 

    Rpt 2 [     // Wrong data: need 3 squares, so repeat 3
    Rpt 5 [
    Fd 6
    Rt


    ]
    // Missing instructions here
    ]

Here is the program with the bugs fixed:
    Rpt 3 [     
    Rpt 5 [
    Fd 6
    Rt


    ]
    Lt
    ]

Debugging

Debugging is the process of finding and fixing “bugs”(errors) in your program.

Bugs can be of different forms, Some bugs that you would find in the following questions include instructions that have been typed in wrong, wrong logic, punctuation errors, missing instructions, wrong data, etc.

(1)   Here is a program for tracing the number 2 as seen on a digital clock using Pro-Bot. Each side of the figure is 6 cm long. Try programming your Pro-Bot with this program and see if it makes the required pattern. If it does not, find the bugs in your program (the parts of the program that are not working correctly) and fix them. Circle the wrong instructions in the given program and write the correct ones instead.























Fd 6
Rt
Fd 6
Rt
Fd 6
Rt
Fd 6
Lt
Fd 12


(2)   Here is a program for tracing the following figure using Pro-Bot. Each side of the figure is 6 cm long. Try programming your Pro-Bot with this program and see if it makes the required pattern. If it does not, find the bugs in your program and fix them. Circle the wrong instructions in the given program and write the correct ones instead.





















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



(3)   Here is a program for tracing the following figure using Pro-Bot. Each side of the figure is 6 cm long. Try programming your Pro-Bot with this program and see if it makes the required pattern. If it does not, find the bugs in your program and fix them. See if you need to add any other instructions as well. Circle the wrong instructions in the given program and write the correct ones instead.






















Rpt 2 [
Rpt 5 [
Fd 6
Rt
]


(4)  Here is a program for tracing the figure below using Pro-Bot. Each side of the square is 6 cm long. The square is divided into two equal parts by the line in the middle. Try programming your Pro-Bot with this program and see if it makes the required pattern. If it does not, find the bugs in your program (the parts of the program that are not working correctly) and fix them. Circle the wrong instructions in the given program and write the correct ones instead.















Rpt 4 [
Fd 6
Rt
]
Fd 2
Rt
Bk 6


(5) Here is a program for tracing the following figure using Pro-Bot. There are three squares stacked up and each square has 6 cm long sides. Try programming your Pro-Bot with this program and see if it makes the required pattern. If it does not, find the bugs in your program and fix them. See if you need to add any other instructions as well. Circle the wrong instructions in the given program and write the correct ones instead.