Liftoff · الإقلاع
Liftoff
Count down from 5 to 1, then print Liftoff!.
A while loop repeats as long as its condition is true, so something inside the loop must change the variable, or the loop never stops. Code written after the loop, without indentation, runs once when the loop ends.
الانطلاق
عد تنازلياً من 5 إلى 1، ثم اطبع Liftoff!.
تكرر حلقة while طالما كانت شرطها صحيحًا، لذا يجب أن يغير شيء ما داخل الحلقة المتغير، وإلا لن تتوقف الحلقة أبدًا. الكود المكتوب بعد الحلقة، بدون مسافة بادئة، يُنفذ مرة واحدة عند انتهاء الحلقة.
Use a while loop to count down from 5 to 1, one number per line, then print Liftoff!. · استخدم حلقة while للعد التنازلي من 5 إلى 1، عددًا واحدًا لكل سطر، ثم اطبع Liftoff!.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.