Script Python #42 (Hors-série) : Triplet pythagoricien (1re forme)
/image%2F6758842%2F20240207%2Fob_490aa9_triplet-pythagoricien-1.png)
Pour rappel, on appelle triplet pythagoricien tout triplet d'entiers (x, y, z) tels que : x² + y² = z² (et il y a une infinité).
Travail demandé :
- Écrire un script qui permet d'afficher les 10 premiers triplets pythagoriciens.
/image%2F6758842%2F20240207%2Fob_113d48_dix-premiers-triplets-pythagoriciens.png)
En voici le script (1re forme) :
/image%2F6758842%2F20240212%2Fob_f4b02e_triplet-pythagoricien-1re-forme-bis.png)
Lire la suite :
Partager cet article
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article