March 18, 2026

Week 24 - Combined Loops and selections

 CLASS OBJECTIVE

Relate PseInt Loops and Selections, from the last class, into some new proyects where we can combine the use of both resources


ACTIVITY 1

Last class we created two algorithms, the fist using "Selections" and the second using a "Loop". Today we'll start with a combined algorithm.

Open PseInt and type the next algorithm. Save the file using the same algorithm's name, into the "Documentos" folder.








Execute the algorithm, test it and personalize it, try to understand it deeply. After this, you'll add comments in every code line explaing what does it do. To do this, use the double slash simbol.

Watch the example in the image below.


Save your file once again and up load it to Classroom.



ACTIVITY 2

Now, this is your turn to create an algorith completely by yourself, in this case, a simple game. Use the paramethers listed below.

  • Use the name Guess_number for the algorithm and the file.
  • User will have only 4 tries. After the fourth, the program ends.
  • The hidden number must be in between 1 and 10 (including them)
  • Look at the last algorithm and make the necessary adjustments.

Upload the file to the same Week 24 post in Classroom.



CLASS NOTES

As always, start writting the class title and objective

  •     Just draw the game flowchart in your notebook