Until you type stop · 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.
'stop'中输入まで
単語を1つずつ読み進め、stop が来たら、その前に何個あったか報告します。
ループ前に最初の単語を読み取って条件にテストする値を与えます。ループ内では単語のカウントを行い、次に次の単語を読み取ります。実行ボタンを押したら、各単語を入力してEnterキーを押してください。
Keep reading words with input() until the word is stop. Then print how many words came before stop. For the words cat, dog, stop, print 2. · input()で単語を読み続け、stopになった時点で停止する。stopの前に来た単語の数を出力する。cat、dog、stopという単語に対しては2を出力する。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。