Algorithmique (8/14) - Boucle TantQue - Structures itératives

27 Nov 2018 · 7 min
6:49

In this French instructional video, the presenter introduces iterative structures in algorithm design, focusing on the while‑loop (structure « TantQue »). After recalling conditional structures, he explains why repeated execution of a code block is needed and how a loop automates this. The semantics of the while‑loop are described: a Boolean condition is evaluated before each iteration; if true, the block executes and the condition is re‑checked, otherwise the loop exits. The risk of an infinite loop is illustrated with a constant‑true condition. To guarantee termination, a loop counter variable (i) is introduced, initialized before the loop and updated each iteration. Two concrete algorithms are presented: (1) printing the word “Bonjour” a user‑specified number of times, showing step‑by‑step how the counter controls the loop; (2) computing n⁽ᵖ⁾ by repeated multiplication, detailing variable declarations (n, p, r, i), initialization of the result r to 1, and the update r ← r × n each iteration. The video mentions that other iterative structures (Pour, Répéter) exist but will be covered later. The overall message is that while‑loops provide a concise, scalable way to repeat operations without duplicating code.

Chapters

More from Yamossoun

8:56
youtube.com

Compteur synchrone - Logique séquentielle

2w ago
11:58
youtube.com

Compteur asynchrone et diviseur de fréquence - Logique séquentielle

3w ago
11:37
youtube.com

Les registres (parallèle et à décalage) - Logique séquentielle

1mo ago
6:14
youtube.com

Bascule T (Toggle) - Logique séquentielle

1mo ago
12:05
youtube.com

Bascule JK - Logique séquentielle

1mo ago
9:17
youtube.com

Bascule D flip-flop active sur front montant - Logique séquentielle

1mo ago
10:08
youtube.com

Bascule D Latch - Logique séquentielle

1mo ago
8:13
youtube.com

Bascule RS - Logique séquentielle

1mo ago
5:04
youtube.com

Logique séquentielle - Introduction

2mo ago
1:15
youtube.com

Le codeur - Logique combinatoire #codeur #logique #circuit #booleanlogic

2mo ago
1:56
youtube.com

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm

3mo ago
See all content