CLASS OBJECTIVE
Recognize that when programming there are different techniques to write code, and the first is the sequential coding, which means that the code executes step by step from the start to the end, without alternate paths.
INTRODUCTION
Now you know how Raptor works: through the creation of flowcharts. Last class, Two new symbols were introduced to you, the input to collect information and the output to show the results.
ACTIVITY
You'll create a program to calculate your first period average. Open raptor and start saving the file. Name it Average Calculator and your student number, example: Average Calculator 12345
- Insert 12 Input symbols, one for each subject.
- Configure each one of them to ask for the final subject score, and name the variable as the subject. Example, ask for "Español" final grading and save it in a variable named español.
- Now, insert an assignment symbol after the input boxes.
- Configure it to add the 12 gradings and divide the result into 12. Assign the final average to a variable named periodaverage. As you can see, there is no space between the words.
- For the last, insert an output symbol. Configure it to show the periodaverage variable.
- Test the program and if it works send it to your teacher through Classroom.
As you can see, this program executes every step, one by one, until the end. This is called sequential coding.
Next class we'll use the rhombus symbol once again to decide between different paths, by making decisions.
CLASS NOTES
As always, write down in your notebook the title of the class, the objective and follow the instructions.
- What does "sequential coding" mean?
- What is a variable?
- Variable names must avoid special characters, Name at least 5 of these special characters.
- Draw a flowchart, such as in the activity, to calculate the course average, asking for the three period averages.
- What is the meanning of Algorithm?
- What is the difference between Algorithm and Program?
- Describe in your own words an algorithm to solve a home problem.