Until you type stop · Jusqu'à ce que vous tapiez stop
Until you type stop
Read words one at a time until the word stop arrives, then report how many came before it.
Read the first word before the loop, so the condition has something to test. Inside the loop, count the word and then read the next one. When you press Run, type each word and press Enter.
Jusqu'à ce que vous tapez stop
Lisez les mots un par un jusqu'à ce que le mot stop apparaisse, puis rapportez combien de mots ont été saisis avant.
Lisez le premier mot avant la boucle, afin que la condition ait quelque chose à tester. À l'intérieur de la boucle, comptez le mot puis lisez le suivant. Quand vous cliquez sur Exécuter, tapez chaque mot et appuyez sur Entrée.
Keep reading words with input() until the word is stop. Then print how many words came before · avant stop. For the words cat, dog, stop, print 2. · Continuez à lire des mots avec input() jusqu'à ce que le mot soit stop. Puis imprimez combien de mots sont venus avant stop. Pour les mots cat, dog, stop, imprimez 2.
Click Run to see the output here. · Cliquez sur Exécuter pour voir le résultat ici.