December 02, 2024

Week 15 - Loop and graph window practice in Raptor

 CLASS OBJETIVE

Practice the loop programming structure using the graph window in Raptor, by creating a given image, using circles and loops.


ACTIVITY INSTRUCTIONS

As you've heard, the idea is that you con create your own programs to solve problems with out your teacher's help. Today, you'll have to create a program with a minimum of instructions. You'll use the graph window Calls, besides a loop, but you'll have to use previous knowledge to do it. 

Create the new program in Raptor and name it  Student number + Shield. Use the next image to know the final outcome.
  1. The graph window size must be exactly 500 horizontal and 500 vertical pixels.
  2. This is sequential program but you can try to use a loop to create the circles.
    • You'll need to use a variable to set the radius of the first circle to 250 pixels. Each subsequent circle should be 50 pixels smaller, continuing until the end.
    • Draw filled circles from outside in, alternating between light red and white.
  3. After the circles, draw the 5 lines using the next coordinates
    • (250,350)
    • (345,285)
    • (310,170)
    • (190,170)
    • (155,285)
  4. Use flood_fill to color blue. You'll have to find out the needed coordinates.

Once you finish the algorithm, turn it in using the Classroom post.




CLASS NOTES

Write down in your notebook the title of the class, the objective and follow the instructions.

  • Draw the final flow chart, shown in Raptor
  • Explain what does every step of the flow chart do, from the start symbol to the end symbol.