October 29, 2024

Week 10 - Loops and selections practice

CLASS OBJECTIVE

Review the three programming structures and the Raptor symbols you learned in this Period 1 by creating a simple game.


ACTIVITY 

It's very simple, you're going to create the next algorithm in Raptor. Name de file as DICE ROLL and you won't receive any other help, you must review what you learned. 

To zoom in the image right click on it and open it on a new tab.

After you finish the algorithm, test it and save it properly but before you turn it in you'll insert COMMENTS to explain every symbol purpose. To do so you must right click on a symbol.


Don't forget, you must right click on every symbol to explain what does it do, as clear as possible.

  • Deliver your file on the Classroom post.



CLASS NOTES GRADING

While you work, I'll review and grade your class notes in your notebook.

October 21, 2024

Week 9 - Loops in Raptor

CLASS OBJECTIVE

Learn the third programming structure named Loop, to create repetitive procedures, using Raptor to create lists of numeric series.


INTRODUCTION

You've learned that when creating an algorithm, the program can execute all the instructions one by one until the end. We called this sequential coding.

Then, you learned to use decisions to create differents paths of coding, which means that not all the steps of the program will be executed. This decision are represented by the rhombus figure.

In this class, you'll learn to create repetitive procedures, in other words, coding that is executed as many times as needed. This kind of programming is called Loop.

Obviously, in Raptor you can drag the loop symbol from the left panel and place it in the algorithm.


In the example, there's a variable named contador which initially contains the number 1. When the algorithm enters the loop, contador will be shown, then it'll increse by two using an assignment symbol. This means that contador no longer contains the number 1, now contains the number 3.

In the next step, the program decides to exit the loop if the condition is matched, en the example contador must be larger than 50 to exit the loop. If not, the program returns to the beginning of the loop.


ACTIVITY

Today you'll create a Raptor algorithm using two loops and a decision. The name of the file will be Student number + Loops and decisions

The main idea is to show the odd numbers between 1 and 50 or to show the pairs numbers between 2 and 50, the user will decide.

  • When the program starts, it should ask the user to decide between odd or pairs. Use an Input Symbol and a Rhombus to create two paths.
  • To use Loops you'll need a variable that changes its content in every cycle. In this activity that variable will be known as counter. This counter will increse by two every cycle.
  • In every cycle, the algorithm shows the user the counter (variable) using a raptor output symbol.
  • When the variable (counter) meets the established condition, the procedure will exit the loop and end the program.


  • As always, when finished, turn in the file using the Classroom post.



CLASS NOTES

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

  • Explain, using your own words, the repetitive coding(loops) and compair it to sequencial and decision coding.
  • Imagine an every day problem that could be solve using loops coding.


HOMEWORK
Research using Internet and write down in your notebook:
  • What is a Call in Raptor and how do we use it,?

October 15, 2024

Week 8 - Selections (Reinforcement Activity)

CLASS OBJECTIVE

Create a Raptor algorithm by your own, using selections, assignments, inputs and outputs, to design a Cash Register.


REINFORCEMENT ACTIVITY

You will create a program in Raptor, but this time you will only have a minimum stock of instructions.

This program will help you reinforce an important topic: you'll create a Cash Register  using selections/decisions.

  1. Open Raptor and save the  file (still empty) with the name  Cash Register with selections
  2. The program must ask the user for a product price and a discount (options 0%, 15%, 30% )
  3. After that, the program will follow the selected path to calculate and show the final price.
Use the next image as a base but you must deduce the  configuration for every symbol


Obviously you'll have to turn in using  the Classroom post.




CLASS NOTES

As always, write down in your notebook the title of the class, the objective and follow the instructions.

  • Draw the final flowchart with all the instructions.