Until you type stop · Cho đến khi nhập 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.
Cho đến khi gõ stop
Đọc từng từ một cho đến khi từ stop xuất hiện, sau đó báo số lượng từ đã đọc trước đó.
Đọc từ đầu tiên trước vòng lặp, để điều kiện có gì để kiểm tra. Bên trong vòng lặp, đếm từ đó rồi đọc từ tiếp theo. Khi nhấn Chạy, hãy gõ từng từ và nhấn 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. · Tiếp tục đọc các từ với input() cho đến khi từ đó là stop. Sau đó in số lượng từ đã xuất hiện trước stop. Đối với các từ cat, dog, stop, in 2.
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.