Short video - Table de multiplication avec la compréhension de liste en Python

3 Nov 2024 · 2 min
2:08

In this short French tutorial, the presenter demonstrates how to generate a two‑dimensional multiplication table (0‑10) in Python using nested list comprehensions. After briefly recalling the earlier method that used explicit nested loops, they show how to initialize a list of empty sub‑lists with a counter `i`, then fill each sub‑list with the products `i j` where `j` iterates from 0 to 10. The resulting 2‑D list is displayed as a formatted grid: the author switches to a single‑loop display, converting each integer to a string and joining the inner lists with a tab character (`\t`) via `join`. An error about joining integers is addressed by casting to strings. The video ends with the correctly formatted multiplication table.

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