LESSON 10 (conditional concept)
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
PROGRAMMING - CONDITIONALS CONCEPT
→ Hello everyone!!! Today we have continued with programming and we have learned the conditionals, these are used by the computer to make decisions.
The Primary Code program offers us several examples where students can see more clearly this new concept. Here are a few examples:
In this example we can choose a value for b. The result will depend on the selected value, the higher number will appear on the screen.
On the other hand, this example allows you to choose a number based on the grade you want to get, depending on the value selected, your result will be a "B", "C" or "F".
On the other hand, we can also see this concept of conditionals in Scratch. We will have to create different variables, in this first example we have "a" and "b", and we have added the conditional of a>b or a<b. According to the values that we give to "a" or "b" the cat will say which variable is greater.
In this other one we have used several foods as variables, and the cat will tell us which food we will eat according to the number we are in the family, because that is our conditional in this case. We will eat one thing or another according to the number of people we are.
For the latter the conditional will be if our grade is less than 5, less than 7 or less than 9. The grade that exceeds 9 will obtain the best grade.
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
Comentarios
Publicar un comentario