CLASS OBJECTIVE
Create in PSeInt an algorithm that uses selections and loops (programming structures) by analyzing a flow chart that describes every step of process.
INTRODUCTION
Any programming language must have the selections and loops programming structures because ane procedure has to make decisions or to repeat procedures. Obviously PSeInt has this two resources among others. The name of this two command are: SI-ENTONCES and REPETIR
SI-ENTONCES
I'm sure it'll be difficult to understand the "written" version of this commands, but I'm sure you'll get use to it. Look at the SI-ENTONCES examples:
Indentation
As you can see, it's not as difficult as it looked. To keep it simple you must always use the indentation to show the inner step of the procedure on the right.
ACTIVITY 1
Now open PseInt and type the next algorithm. What does it do?
REPETIR
REPETIR is a command to create a loop, in other words, the repetition of a list of actions. In the next example, a message will be shown over and over until the variable div decreases until cero.
Now in a flowchart look:
Never forget to use the indentation to identify the procedures in the selections or in the loops structures.
ACTIVITY 2
Now open PseInt once again and type the next algorithm. What does it do? Have you done something like this before?
Upload the two files (SI_ENTONCES y REPETIR_HASTA QUE) to the Classroom post.
CLASS NOTES
Write down in your notebook the title of this class and the objective. Using Raptor symbols, draw the next flow charts.
- Draw the flow chart for the Activity 1
- Draw the flow chart for the Activity 2
Show your answers to your teacher.