Developing Algorithms · Développement d'algorithmes
| English | Français |
|---|---|
| algorithm/ˈælɡərɪθəm/ | algorithme |
| finite/ˈfaɪnaɪt/ | fini |
| sequencing/ˈsiːkwənsɪŋ/ | séquencement |
| flowchart/ˈfləʊtʃɑːt/ | diagramme de flux |
| natural language/ˈnætʃərəl ˈlæŋɡwɪdʒ/ | langage naturel |
| same result/seɪm rɪˈzʌlt/ | même résultat |
| refine/rɪˈfaɪn/ | affiner |
| efficient/ɪˈfɪʃənt/ | efficace |
What is an algorithm?
- An algorithm 算法 is a finite 有限的, step-by-step set of instructions to complete a task.
- "Finite" means it always ends after a limited number of steps.
- A recipe, a route to school, and a sorting method are all algorithms.
- Every program is built from algorithms.
Qu'est-ce qu'un algorithme ?
- Un algorithme 算法 est un ensemble fini 有限的, étape par étape, d'instructions pour accomplir une tâche.
- "Fini" signifie qu'il se termine toujours après un nombre limité d'étapes.
- Une recette, un itinéraire vers l'école et une méthode de tri sont tous des algorithmes.
- Chaque programme est construit à partir d'algorithmes.
An algorithm is: · Un algorithme est :
"Finite" means it always ends after a limited number of steps. · "Finie" signifie qu'il se termine toujours après un nombre limité d'étapes.
Three building blocks
- Every algorithm can be built from three basic structures:
- sequencing 顺序: doing steps one after another;
- selection: choosing between paths;
- iteration: repeating steps.
Trois blocs fondamentaux
- Tout algorithme peut être construit à partir de trois structures de base :
- séquençage 顺序 : exécuter les étapes les unes après les autres ;
- sélection : choisir entre des chemins ;
- itération : répéter des étapes.
Sequencing, selection, or iteration? · Séquencement, sélection ou itération ?
Every algorithm is built from three structures: sequencing (steps in order), selection (choosing a path), and iteration (repeating steps). · Tout algorithme est construit à partir de trois structures : séquencement (étapes dans l'ordre), sélection (choix d'un chemin) et itération (répétition d'étapes).
Which are the three building blocks of algorithms? (Select all that apply) · Quelles sont les trois briques fondamentales des algorithmes ? (Sélectionnez toutes les réponses applicables)
Sequencing, selection, and iteration build every algorithm. · Le séquencement, la sélection et l'itération construisent tout algorithme.
A flowchart, pseudocode, and natural language can all express: · Un organigramme, du pseudocode et le langage naturel peuvent tous exprimer :
All three describe the same steps differently. · Les trois décrivent les mêmes étapes différemment.
Two different algorithms can produce the same correct result, one faster than the other. · Deux algorithmes différents peuvent produire le même résultat correct, l'un étant plus rapide que l'autre.
Neither is "more correct" if both give the right answer. · Aucun n'est "plus correct" si les deux donnent la bonne réponse.
Ways to express it
- You can express an algorithm as pseudocode, as a flowchart 流程图 (boxes and arrows), or in plain natural language 自然语言.
- All three describe the same steps in different forms.
- Different algorithms can give the same result 相同结果 — one short but slow, another longer but fast.
- Neither is "more correct" if both give the right answer.
Manières de l'exprimer
- Vous pouvez exprimer un algorithme sous forme de pseudocode, comme un diagramme de flux 流程图 (boîtes et flèches), ou en langue naturelle 自然语言 simple.
- Les trois décrivent les mêmes étapes sous des formes différentes.
- Différents algorithmes peuvent donner le même résultat 相同结果 — l'un court mais lent, l'autre plus long mais rapide.
- Aucun n'est "plus correct" si les deux donnent la bonne réponse.
The "largest of three" algorithm runs on a=4, b=9, c=6. What does it output? · L'algorithme "le plus grand de trois" s'exécute sur a=4, b=9, c=6. Que sort-il ?
Start 4; 9 > 4 → 9; 6 > 9 is false → stays 9. · Commence à 4 ; 9 > 4 → 9 ; 6 > 9 est faux → reste 9.
Improving an algorithm step by step to be correct, clear, and efficient is called ______. · Améliorer un algorithme étape par étape pour qu'il soit correct, clair et efficace s'appelle ______.
Refining follows testing, making the algorithm better each pass. · L'affinement suit le test, rendant l'algorithme meilleur à chaque passage.
Refine for efficiency
- We refine 改进 an algorithm so it is correct, clear, and efficient 高效.
- Refining means improving it step by step after testing.
Largest of three. largest ← a; IF b > largest: largest ← b; IF c > largest: largest ← c; DISPLAY largest. For a=4, b=9, c=6: start 4; 9 > 4 → largest 9; 6 > 9 is false → stays 9. Output 9. This uses sequencing and selection.
Affiner pour l'efficacité
- Nous affinons 改进 un algorithme pour qu'il soit correct, clair et efficace 高效.
- Affiner signifie l'améliorer étape par étape après avoir testé.
Le plus grand de trois. largest ← a ; SI b > largest : largest ← b ; SI c > largest : largest ← c ; AFFICHER largest. Pour a=4, b=9, c=6 : commencez 4 ; 9 > 4 → plus grand 9 ; 6 > 9 est faux → reste 9. Sortie 9. Cela utilise le séquençage et la sélection.
An algorithm is a finite set of steps, built from three structures: sequencing, selection, and iteration. You can express it as pseudocode, a flowchart, or natural language. Different algorithms can give the same result, so we refine them to be correct, clear, and efficient.
Un algorithme est un ensemble fini d'étapes, construit à partir de trois structures : séquençage, sélection et itération. Vous pouvez l'exprimer sous forme de pseudocode, un diagramme de flux ou une langue naturelle. Différents algorithmes peuvent donner le même résultat, nous les affinons donc pour qu'ils soient corrects, clairs et efficaces.