CLASS OBJECTIVE
Know the Raptor programming environment for the first time, by creating a program that performs a basic process to request information, do a process and displays a result.
FLOWCHARTS
Last class you learned to use 3 flowchart symbols: the elipse (oval), the arrow and the rectangle. Now you'll learn to represent interaction with users though the paralelogram that may represent input and output.
Before start programming
- Process or assignment, which represent the internal processes like calculations or the manipulation of the information.
- Input ask a person to introduce information, for example, words or numbers.
- Output does exactly the opposite, it shows information to the user, mostly the results of the processes.
Let's try one last paper flowchart using the Input and Output symbols.
RAPTOR
Before we start with Raptor you have to install the Direct access icon. Follow the next directions:
- Open the Window´s File Explorer and the "Este equipo" option on the left panel.
- Double click on the Hard Disk Drive (Usually C:)
- Now look for the "Archivos de programa (x86)" folder and get into it.
- Look for the "Raptor_avalonia" folder and get into it.
- Locate
INTRODUCTION
You've been learning to create problem solutions using technology tools. Now you'll be introduce to programming languages with Raptor programming environment.
With Raptor you´ll create programs (algorithms) and when you execute them you'll see the process step by step.
The Raptor main feature is that the programs will be created using flowcharts.
When you open Raptor you'll alway see the ellipse figures that start and end the program. Between them you'll have to place the flowchart elements that will be executed.
FIRST PROGRAM
Obviously you'll have to open Raptor. It should be installed in your Windows desktop. Its icon shows a dinosaur.
Once opened, Raptor will show you 2 windows, the main programming window and the master console. You'll design in the main window but you'll see the results of your algorithm in the master console. (You can look at the image up above)
To start you just have to drag the symbols (input, output and assignment) to the space between the start and end ellipse.
- Drag the Input symbol to the main structure
- Double clic on the input symbol.
- "Prompt" is the text that will be shown to the user. Type "What is your name?"
- "Variable" is the name that will be assign to information collected. Type NAME
- Drag the Assignment symbol to the structure
- This is the process that will be executed. Double clic on it.
- Type SALUTE in the SET text box.
- Then type "WELCOME "+NAME+" TO RAPTOR"
- Drag the Output symbol to the structure
- Double clic on it.
- Type "SALUTE"
- This will be the answer that will be shown in the console window.
To execute the algorithm press the play button. Before, I suggest to slow the execution so you can see it step by step.
To save the algorithm click on the FILE menu, select SAVE and type a name for the file.
ACTIVITY
Instead of typing messages, you´ll create a small calculator. Clic on FILE menu and NEW to create a new algorithm.
- Use 2 input symbols to ask for two numbers.
- Use 4 assignment symbols to Add, Subtract, Multiply and Divide.
- Name them ADDITION, SUBTRACTION, MULTIPLICATION and DIVISION
- Use 4 output symbols to show the results.
Name the file as CALCULATOR.rap
You'll deliver this file through a Classroom post.
CLASS NOTES
As always, write down in your notebook the title of the class, the objective and follow the instructions.
- Explain in your own words, What is Raptor?
- What does "programming environment" means? You can use Google.
- Draw the Raptor symbols that we used in today activities.