Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Finish the countdown · ⁨เติมการนับถอยหลังให้เสร็จ⁩

English

Finish the countdown

The loop prints count, but nothing ever changes it — so it would never end. Add the one line that takes 1 off count, inside the loop.

A while loop keeps going for as long as its question is true. Something inside it has to move count towards 0, or the answer stays True for ever. That line is indented under the while, like the print above it.

ไทย

เสร็จสิ้นการนับถอยหลัง

ลูปจะพิมพ์ count แต่ไม่มีอะไรไปเปลี่ยนแปลงมัน — ดังนั้นมันจะไม่จบเลย เพิ่มบรรทัดเดียวที่นำ 1 ออกจาก count เข้าไปในลูป

ลูป while จะทำงานต่อไปจนกว่าคำถามจะเป็นจริง สิ่งบางอย่างภายในต้องทำให้ count เคลื่อนเข้าหา 0 หรือคำตอบจะคงอยู่เป็น True ตลอดกาล บรรทัดนั้นถูก จัดย่อ ไว้ใต้ while เหมือนกับ print ด้านบน

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP