Until you type 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، ثم أبلغ عن عدد الكلمات التي سبقتها.
اقرأ الكلمة الأولى قبل الحلقة، حتى يكون لدى الشرط ما يختبره. داخل الحلقة، عُد الكلمة ثم اقرأ التالية. عند الضغط على تشغيل، اكتب كل كلمة واضغط على 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. · اضغط تشغيل لرؤية المخرجات هنا.