1 / 28

Raptor

Raptor. Mr. Lau Ka Lun Lai King Catholic Secondary School. Introduction. RAPTOR is freely distributed as a service to the CS education community. It was originally developed by and for the US Air Force Academy, Department of Computer Science. It is free software.

anila
Download Presentation

Raptor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Raptor Mr. Lau Ka Lun Lai King Catholic Secondary School

  2. Introduction • RAPTOR is freely distributed as a service to the CS education community. • It was originally developed by and for the US Air Force Academy, Department of Computer Science. • It is free software. • RAPTOR is a flowchart-based programming environment. • to help students visualize their algorithms and avoid syntactic baggage. • RAPTOR programs are created visually and executed visually by tracing the execution through the flowchart. • Required syntax is kept to a minimum.

  3. Website • http://raptor.martincarlisle.com/

  4. Layout • Mode -> Novice • Run the program • Pause • Stop • Speed of running • Generate source code

  5. Program Structure • When executing a RAPTOR program, you begin at the Start symbol and follow the arrows to execute the program • A RAPTOR program stops executing when the End symbol is reached.

  6. RAPTOR Statements/Symbols • The top four statement types: • Assignment, Call, Input, and Output • The bottom two types: • Selection and Loops

  7. RAPTOR Variables

  8. Common errors when using variables

  9. Input Statement/Symbol

  10. Assignment Statement/Symbol • Variable ← Expression

  11. Operators and Functions

  12. Procedure Call Statement/Symbol

  13. Examples

  14. Examples (cont.) Read_Scores Calculate_Average_Score Print_Those_Above_Average

  15. Output Statement/Symbol

  16. Comments in RAPTOR

  17. Sequential Program Control • in sequence • one-after-the-other

  18. Selection Control

  19. relational and logical operators

  20. Selection Control Examples

  21. Cascading Selection statements

  22. Loop (Iteration) Control

  23. Input Validation Loops

  24. Counting Loops Statements to be repeated

  25. Input Loops

  26. "Running Total" Loops

  27. "Counting" Loops

  28. Exercises • Write a series of RAPTOR statements that determines if X has the value 1, 2, or 3, and prints out “ONE”, “TWO”, or “THREE” accordingly. • Write a complete program that converts between degrees Fahrenheit and Celsius. The user must first enter the conversion that is desired (F to C or C to F) using any means you want and then enter the value to be converted. The formulas for conversion are: F = 9/5 C + 32 and C = 5/9 (F – 32) • Write a complete program that plays the game of HI-LO. The program asks one user for a number between 1 and 100 and verifies that such a number has been entered. It then asks a second user for a guess and reads it in. If the guess is correct a congratulation message is written to the screen and the program ends. Otherwise the message “HI” or “LOW” is displayed (if the guess is higher or lower) and another guess is asked for and read in.

More Related