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.
Liftoff
Hitung mundur dari 5 hingga 1, lalu cetak Liftoff!.
Perulangan while akan terus berjalan selama kondisinya benar, sehingga sesuatu di dalam perulangan harus mengubah variabel tersebut, atau perulangan tidak akan pernah berhenti. Kode yang ditulis setelah perulangan, tanpa indentasi, akan dijalankan sekali ketika perulangan selesai.
Use a while loop to count down from 5 to 1, one number per line, then print Liftoff!. · Gunakan perulangan while untuk menghitung mundur dari 5 hingga 1, satu angka per baris, lalu cetak Liftoff!.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.