LESSON 10 (loop concept)
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
PROGRAMMING - LOOPS CONCEPT
First we have used again the Primary Code program, selecting the loops section. Here are some examples:
1. We must give a value to "i", in this way it will increase as we click on the button.
2. In this other example, the values increase by 2 as they meet the indications and values that "i", "a", and "b" have.
3. Here is another example, as "i" increases, the values of "a" and "b" change according to their function.
On the other hand, using Scratch I have done two different exercises using the loops.
In this exercise the cat counts from 1 to 10 and also from 10 to 1. To repeat this action, we must press the green flag.
In this other exercise I have inserted two different characters. The cat will do a different action than the dog, however both actions will be repeated at the same time when we press the space key.
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
Comentarios
Publicar un comentario