WHILE LOOP, This loop repeats a block of code as long as a given condition is True., Ideal for situations where the number of iterations is unknown beforehand., The loop may not execute at all if the condition is initially false., It can potentially run forever if the condition never becomes false (infinite loop)., The loop’s condition is checked before each iteration., It’s useful for reading data until a sentinel value (like "done") is entered., FOR LOOP, It is commonly used to iterate over each item in a list, string, or range., Often used with the range() function to repeat code a specific number of times., It processes each element in a sequence (e.g., list, tuple) one by one., Typically uses a counter or index variable that increments or decrements., Best choice when you need to repeat a block of code a fixed number of times., NESTED LOOP, This structure contains one loop inside another loop., Useful for creating patterns like triangles or grids using stars or numbers., Often used for tasks like matrix operations or multi-dimensional data., It can be used to traverse through rows and columns in a table-like structure..
0%
Speed Sorting Description Activity: Loop Lightning Sort!
Bagikan
Bagikan
Bagikan
oleh
Epssabangan
G7
ICT
Computer
Basic programming
Python
Looping
Edit Konten
Cetak
Menyematkan
Tambah
Tugas
Papan Peringkat
Tampilkan lainnya
Tampilkan lebih sedikit
Papan peringkat ini saat ini bersifat pribadi. Klik
Share
untuk menjadikannya publik.
Papan peringkat ini telah dinonaktifkan oleh pemilik sumber daya.
Papan peringkat ini dinonaktifkan karena opsi Anda berbeda dengan pemilik sumber daya.
Opsi Pemulihan
Penyortiran cepat
adalah templat terbuka. Ini tidak menghasilkan skor untuk papan peringkat.
Diperlukan login
Gaya visual
Font
Diperlukan langganan
Pilihan
Berganti templat
Tampilkan semua
Format lainnya akan muncul saat Anda memainkan aktivitas.
Buka hasil
Salin tautan
Kode QR
Hapus
Pulihkan simpan otomatis:
?