Monday, October 28, 2024

Raptor Programming

 RAPTOR (Rapid Algorithmic Prototyping Tool for Ordered Reasoning) is a flowchart-based programming tool designed to help users visualize algorithms. Here are some examples of simple RAPTOR programs:                                             Program 1: Print ‘Welcome` message on the screen                                                                                 Step 1: Open RAPTOR

Launch the RAPTOR application on your computer.

Step 2: Create a New Flowchart

Start a new flowchart by selecting "New" from the menu.

Step 3: Add a Start Symbol

Drag the Start symbol (oval shape) onto the workspace. This indicates the beginning of your program.

Step 4: Add an Output Symbol

Drag an Output symbol (parallelogram shape) onto the workspace.

Connect it to the Start symbol by dragging a line from Start to Output.

Step 5: Configure the Output Symbol

Double-click on the Output symbol to open its properties.

In the text box, type "Welcome" (including quotes) to display this message when the program runs.

Step 6: Add an End Symbol

Drag an End symbol (oval shape) onto the workspace.

Connect it from the Output symbol to indicate that the program will terminate after displaying the message.

Step 7: Run Your Program

Click on the "Run" button (play icon) in the toolbar to execute your flowchart.

A dialog box should appear displaying "Welcome".

Flowchart Overview

Your flowchart should look like this:

[Start] --> [Output: "Welcome"] --> [End]

                                                        Program2:Addition of 2 numbers.          

 Step 1: Open RAPTOR

- Launch the RAPTOR application on your computer.


 Step 2: Create a New Flowchart

- Start a new flowchart by selecting "New" from the menu.


Step 3: Add a Start Symbol

- Drag the Start symbol (oval shape) onto the workspace to indicate the beginning of your program.

 Step 4: Add Input Symbols

- You will need two Input symbols (parallelogram shapes) to get the numbers from the user.

- Drag the first Input symbol onto the workspace. Connect it to the Start symbol.

- Double-click on this Input symbol and set its prompt to `"Enter the first number:"`. Assign a variable name, for example, `num1`.


- Drag a second Input symbol onto the workspace. Connect it to the first Input symbol.

- Double-click on this second Input symbol and set its prompt to `"Enter the second number:"`. Assign a variable name, for example, `num2`.


 Step 5: Add a Calculation Symbol

- Drag a  Process symbol (rectangle shape) onto the workspace. Connect it to the second Input symbol.

- Double-click on this Process symbol and enter the expression for summing the two numbers. For example:

  

  sum = num1 + num2

 

  Here, `sum` is a new variable that will hold the result of the addition.


 Step 6: Add an Output Symbol

- Drag an **Output** symbol onto the workspace and connect it to the Process symbol.

- Double-click on this Output symbol and set its message to:

  

  "The sum is: " + sum

  

  This will display the result of the addition when executed.


Step 7: Add an End Symbol

- Finally, drag an **End** symbol (oval shape) onto the workspace and connect it from the Output symbol to indicate that the program will terminate after displaying the result.

 Step 8: Run Your Program

- Click on the "Run" button (play icon) in the toolbar to execute your flowchart.

- Follow the prompts to enter two numbers, and you should see their sum displayed.

Flowchart Overview

Your flowchart should look like this:


```

[Start] 

   |

[Input: "Enter first number"] --> [Input: "Enter second number"]

   |                                       |

[Process: sum = num1 + num2] |

   |

[Output: "The sum is: " + sum]

   |

[End]

                                   


No comments:

Post a Comment