B1 · Episode 5 · 7:59

The Progressive Learning of Algorithms

This episode explains how algorithm instruction progresses through school levels: starting with linear sequences, then introducing loops to handle repetition, and finally adding conditional statements (if-then-else) to enable decision-making in programs.

Source:Bruno Lambert / tube-numerique-educatif.apps.education.fr · License:CC BY-SA 4.0

Transcript

  1. Algorithmes et codage, cinquième et dernière partie.

    Algorithms and coding: Part 5, the final part.

  2. On va essayer d'avoir un petit peu une vue d'ensemble sur la

    In this final part,

  3. notion de codage et même sur les programmes en général dans cette dernière partie.

    we’ll take a brief overview of the concept of coding—and of programs in general.

  4. Au début avec le Bivot, on a des algorithmes linéaires,

    At first, with Bee-Bot,

  5. c'est- à- dire qu'on a première instruction, deuxième instruction,

    we write linear algorithms—

  6. troisième instruction, quatrième instruction,

    that is, instructions run one after another: first instruction, second instruction,

  7. toutes les instructions sont utilisées, elles sont les unes après les autres,

    third, fourth—all instructions are executed, one right after the other,

  8. elles se suivent et on va comme ça jusqu'à la fin du programme.

    continuing like this until the program ends.

  9. À partir du cycle 3, on peut commencer à remplacer certaines instructions

    Starting in Cycle 3,

  10. répétées par des boucles.

    we can begin replacing repeated instructions with loops.

  11. La boucle va consister à, à l'intérieur de

    A loop consists of identifying, inside the loop,

  12. la boucle, de repérer des motifs dans notre programme qui vont être répétés

    patterns in our program that will be repeated several times,

  13. plusieurs fois.

    and grouping them together.

  14. Là, on a une petite ligne de programmation pour.

    Here’s a short line of code written for the Blue-Bot robot below.

  15. Le bluebot en bas.

    The Blue-Bot robot shown below.

  16. Donc on voit que la première instruction fait pivoter le robot sur la gauche.

    We see that the first instruction rotates the robot left.

  17. Ensuite, il y a deux crochets bleus, un qui ouvre, un qui ferme,

    Then come two blue square brackets—one opening, one closing—

  18. et entre on voit qu'il y a une flèche avancer.

    and between them, an arrow labeled “move forward.”

  19. Donc ça, c'est l'intérieur de ma boucle.

    This is the body of my loop.

  20. Et à côté de la boucle, je vois qu'il y a marqué quoi.

    Next to the loop, what is written?

  21. Qu'est- ce que ça veut dire?

    What does it mean?

  22. Ça veut dire que le avancer

    It means the “move forward” instruction

  23. va être répété quatre fois.

    will be repeated four times.

  24. Ça veut dire que je vais avancer quatre fois.

    That is, I will move forward four times.

  25. Donc là, on a une boucle

    So here we have a loop

  26. qui me permet de dire voilà, je tourne à gauche et ensuite j'avance quatre fois

    that lets me say clearly: turn left, then move forward four times—

  27. plutôt que de dire je tourne à gauche et ensuite avance, avance,

    instead of writing: turn left, then move forward, move forward,

  28. avance, avance.

    move forward, move forward.

  29. Les instructions conditionnelles, c'est plutôt fin de cycle trois,

    Conditional statements are typically taught toward the end of primary school (Cycle 3),

  30. c'est plutôt à partir de la sixième ou à partir de

    usually starting in sixth grade—or even fifth grade.

  31. la cinquième. Je ne crois pas qu'il faille les

    I don’t believe they should be introduced earlier in schooling.

  32. faire entrer dans l'enseignement avant.

    They shouldn’t be taught before that stage.

  33. Sinon, alors j'avais fait l'exemple des mots qui ont le pluriel en x ou en s,

    Otherwise, I previously gave an example: nouns whose plurals end in ‘x’ or ‘s’,

  34. avec la terminaison ou.

    with the ending ‘-ou’.

  35. On se souvient de ça.

    You probably remember this rule.

  36. Simplement, voilà, le si

    Simply put, it’s the ‘if…’ (si) structure,

  37. alors sinon, ça me permet d'avoir des embranchements dans

    followed by ‘then…’ (alors) and ‘otherwise…’ (sinon)—

  38. mon programme et de ne plus être linéaire.

    this lets your program branch off, no longer running linearly.

  39. On va peut- être des fois passer par, en fonction d'une situation donnée,

    So sometimes, depending on a given situation,

  40. avoir un comportement du programme ou un autre.

    the program will behave one way—or another.

  41. Donc généralement, ce qui est derrière le si, c'est une question fermée,

    Generally, what follows ‘if’ is a yes/no question—

  42. auquel on peut répondre que par vrai ou faux.

    one that can only be answered ‘true’ or ‘false’.

  43. Si la réponse est vrai, il faut appliquer ce qu'il y a derrière le alors.

    If the answer is ‘true’, execute what follows ‘then’;

  44. Si la réponse est fausse, on applique ce qu'il y a derrière le sinon.

    if it’s ‘false’, execute what follows ‘otherwise’.

  45. Dans un si alors, on peut faire un si alors sans avoir de sinon,

    In an ‘if…then…’ structure, you may omit the ‘otherwise’ part,

  46. il faut au moins un alors.

    but you must include at least a ‘then’ part.

  47. Donc là, on est un peu dans ce qu'on apprend à faire en sixième,

    So here, we’re covering material roughly equivalent to what students learn in sixth grade,

  48. cinquième avec Scratch.

    or fifth grade, using Scratch.

  49. Donc première instruction, on va

    The first instruction is:

  50. demander combien font 2 et 2 et on attend.

    ask ‘What is 2 plus 2?’ and wait for input.

  51. On attend quoi?

    What exactly are we waiting for?

  52. On attend une réponse de l'utilisateur.

    We’re waiting for the user’s response.

  53. Donc ce qu'il y a en haut, le petit chat,

    That little cat icon at the top,

  54. c'est ce qui va apparaître sur l'écran de l'élève.

    is what will appear on the student’s screen.

  55. Donc on communique souvent avec un petit chat.

    So we often communicate using a small cat icon.

  56. Donc c'est le petit chat qui dans sa bulle demande combien fait 2 et 2.

    So the little cat in its speech bubble asks: What is 2 plus 2?

  57. Et en dessous, on voit qu'il y a une petite barre pour répondre dans laquelle la

    Below, there’s a small input bar for answering;

  58. personne qui est en face, l'élève, va répondre,

    the student facing it will type their answer there,

  59. il va écrire sa réponse et puis il va appuyer sur la touche Entrée.

    write their answer, then press Enter.

  60. Donc c'est cette écriture et l'appui sur la touche Entrée qu'attend le programme

    When the program displays ‘waiting’, it’s waiting for these two actions:

  61. quand il marque attend.

    typing text and pressing Enter.

  62. Il va mettre le résultat, enfin ce qui a été entré par la

    It places what the user entered,

  63. personne qui répond au programme, dans réponse.

    i.e., what the responder typed, into the variable ‘réponse’ (answer).

  64. Et là, l'instruction conditionnelle est la suivante: si réponse égal 4.

    Then comes the conditional instruction: if ‘réponse’ equals 4,

  65. Alors, alors là il n'y a pas de alors,

    then — there’s no separate ‘then’ line;

  66. juste en dessous il y a une instruction, c'est dire bravo.

    just below it, one instruction runs directly: ‘say: Bravo!’

  67. Là, on a le premier petit chat en bas à gauche qui dit bravo.

    The first small cat icon at the bottom left then says ‘Bravo!’

  68. Si on met n'importe quoi d'autre que 4, si on met 5, si on met z,

    If you enter anything else—like 5 or the letter z,

  69. si on écrit mathématique.

    or even type ‘mathématique’ (French for ‘mathematics’),

  70. Le petit chat il répondra désolé ce qui est en bas.

    the cat replies ‘Sorry’ at the bottom.

  71. Donc voilà un peu ce qu'on peut dire des instructions conditionnelles si,

    That’s basically how the conditional instructions ‘if’,

  72. alors et sinon.

    ‘then’, and ‘else’ work.

  73. On peut avoir des boucles conditionnelles,

    We can also use conditional loops,

  74. c'est- à- dire on va répéter jusqu'à ce qu'un

    meaning we repeat certain actions,

  75. événement arrive.

    until a specific event occurs.

  76. Par exemple, quand j'ai ma chenille, si

    For example, when I control a caterpillar,

  77. je fais un peu un pseudo- code en dessous, je vais répéter jaune,

    I write some pseudocode below: repeat ‘turn yellow’,

  78. avancer d'une case, rouge.

    ‘move forward one cell’, ‘turn red’;

  79. Et je répète jusqu'à que

    and keep repeating until

  80. fin de la chenille soit vrai, c'est- à- dire que je sois arrivé à

    ‘caterpillar end reached’ becomes true—

  81. la fin de la chenille.

    that is, until I’ve reached the caterpillar’s end.

  82. Voilà mon algorithme.

    Here is my algorithm.

  83. Là, c'est pas un algorithme où je vais dire répète cinq fois,

    This isn’t an algorithm where I’d say, ‘Repeat five times,’

  84. répète dix fois.

    or ‘Repeat ten times.’

  85. C'est le genre d'algorithme où on va pas s'embêter à calculer à l'avance combien de

    It’s the kind of algorithm where we won’t bother calculating in advance

  86. fois je vais devoir le répéter.

    how many times we’ll need to repeat it.

  87. Je vais le répéter jusqu'à ce qu'un événement arrive,

    I’ll repeat it until a certain event occurs—

  88. ici arriver à la fin de la chenille.

    here, that means reaching the end of the caterpillar.

  89. Pour la Macarena, la boucle correspond à répéter,

    For the Macarena, the loop corresponds to repeating the dance moves—

  90. là je mets l'intégralité de la chorégraphie dans la boucle,

    I put the entire choreography inside this loop,

  91. jusqu'à ce que la chanson continue ou alors j'entends la musique que ça soit faux,

    repeating it as long as the song continues, or until I hear the music go wrong—

  92. c'est- à- dire qu'il n'y ait plus de

    that is, until

  93. musique. À partir de là, j'arrête de danser.

    the music stops—and then I stop dancing.

  94. Donc voilà un peu comment on pourrait décrire les boucles

    So, this is roughly how we describe conditional loops

  95. conditionnelles.

    in practice.

  96. Si j'essaie de résumer quelques éléments de progressivité,

    If I try to summarize some key points about progressive learning,

  97. ça commence un peu dans la découverte du monde, puis ça va être entre sciences

    it starts with discovering the world, then branches into two paths: science and technology on one side,

  98. et technologies d'un côté, mathématiques de l'autre,

    mathematics on the other.

  99. technologies tout court au collège et mathématiques,

    In middle school, it covers technology (as a standalone subject) and mathematics;

  100. et puis sciences numériques et technologiques et mathématiques

    in high school, it includes digital and technological sciences, plus mathematics.

  101. au lycée. Donc l'algorithmique va être à la fois traitée du point de vue des

    So, algorithmic thinking will be taught from both the mathematical

  102. mathématiques et du point de vue de la technologie.

    and the technological perspectives.

  103. Jusqu'en fin de cycle 3, on traite de se

    Up through the end of Cycle 3,

  104. repérer et se déplacer.

    we focus on positioning and movement.

  105. C'est ça l'objet sur lequel on travaille l'algorithmique en termes d'algorithmes,

    This is precisely the topic we use to teach algorithms,

  106. avec notamment les robots ou les petits personnages à déplacer dans l'écran.

    for instance, using robots or small characters that move on screen.

  107. Et en mathématiques, ce n'est que dans les programmes de géométrie du cycle 3

    In mathematics, the concept of algorithms appears only in the geometry curriculum of Cycle 3.

  108. qu'apparaît la notion d'algorithmique.

    only then does the notion of algorithmic thinking appear.

  109. en technologie, en sciences et technologies,

    In technology, science, and technology classes,

  110. le robot lui est étudié pour lui- même aussi en tant qu'objet technique.

    robots themselves are studied as technical objects.

  111. On a aussi une autre facette à l'étude du robot.

    Robot study also has another dimension.

  112. Les algorithmes en eux- mêmes vont se complexifier.

    The algorithms themselves will become increasingly complex.

  113. Au cycle 1, ils sont linéaires, ensuite au cycle 2, fin de cycle 2,

    In Cycle 1, they are linear;

  114. cycle 3, on va dire des boucles.

    by the end of Cycle 2 and in Cycle 3, we introduce loops.

  115. Fin de cycle 3, cycle 4,

    By the end of Cycle 3 and in Cycle 4,

  116. on va avoir des instructions conditionnelles.

    we add conditional instructions.

  117. À partir du cycle 4, on abandonne le tout géométrique.

    Starting from Cycle 4, we abandon the purely geometric approach entirely.

  118. Généralement, les déplacements maintenant vont être plutôt remplacés par la

    Now, movement tasks are generally replaced by

  119. construction de dessins.

    drawing construction.

  120. Comme j'ai montré avec les

    As I demonstrated earlier with triangles.

  121. triangles. Mais finalement, la construction de dessins,

    Yet ultimately, drawing construction is

  122. c'est le déplacement d'un crayon à l'écran, c'est juste

    simply moving a virtual pen across the screen,

  123. dessiner la trace de l'objet, du petit robot, du petit chat qu'on déplace.

    i.e., tracing the path of the object being moved—such as a small robot or kitten.

  124. Mais la programmation va aussi servir à traiter des nombres,

    Meanwhile, programming will also be used to handle numbers,

  125. des variables, des listes, des tableaux.

    variables, lists, and arrays.

  126. Donc on va dépasser juste la notion de se repérer, de se

    Thus, we go beyond just orientation and movement;

  127. déplacer, on va traiter beaucoup d'autres choses à l'aide de la pensée

    instead, we use algorithmic thinking to handle many other topics.

  128. algorithmique.

    That’s the role of algorithmic thinking.

  129. On peut se souvenir de ce qu'on avait sur les opérations posées,

    We can recall topics like column arithmetic operations,

  130. etc. Donc voilà, jusqu'au cycle

    and so on. In short, up to Cycle 3,

  131. 3, on va réserver l'algorithmique, la

    we restrict algorithmics and programming to spatial reasoning:

  132. programmation à des considérations spatiales, à se déplacer,

    for example, moving and orienting oneself.

  133. se repérer. Par la suite, à partir du cycle 4,

    After that, starting from Cycle 4,

  134. on ouvre ça complètement sur la plupart des domaines des mathématiques.

    it opens fully to most areas of mathematics.

  135. Le langage de codage devient aussi de plus en plus abstrait.

    Coding languages also become increasingly abstract.

  136. Au début, on va appuyer sur des boutons, ensuite on a des pictogrammes,

    At first, we press buttons;

  137. ensuite on a un langage un peu visuel quand on arrive au collège avec Scratch,

    then we get icons;

  138. et puis à la fin quand on est au lycée, on va passer à un langage totalement.

    then in middle school, we use a more visual language like Scratch; finally, in high school, we switch to a fully text-based language.

  139. Voilà, cette série de vidéos est finie.

    That’s it—this video series is now complete.

  140. J'espère avoir été clair sur ce qu'on peut un peu savoir,

    I hope I’ve clearly explained

  141. sur faire le tour des notions d'algorithmique.

    the fundamental concepts of algorithms.

  142. Merci beaucoup.

    Thank you very much!