NAMA LENGKAP:
(Sesuaikan dengan dipresensi Anda)
Looping dalam Pemrograman

Quiz
•
Computers
•
10th Grade
•
Hard
Agus Yudiatmoko
FREE Resource
22 questions
Show all answers
1.
OPEN ENDED QUESTION
1 min • Ungraded
Evaluate responses using AI:
OFF
2.
OPEN ENDED QUESTION
1 min • Ungraded
KELAS:
(Sesuaiakan Kelas Anda saat ini)
Evaluate responses using AI:
OFF
3.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Perhatikan gambar di bawah ini! Apa keluaran dari program di atas...
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6
0 2 4 6 7
0 2 4 6
0 1 2 3 4
Answer explanation
1. Perulangan for:
Perulangan for dimulai dengan i sama dengan 0.
Perulangan for akan berlanjut selama i kurang dari 7.
Pada setiap iterasi, nilai i akan bertambah 1.
2. Kondisi if:
Di dalam perulangan for, terdapat kondisi if yang memeriksa apakah nilai i habis dibagi 2 (genap).
Jika i genap, kode di dalam blok if akan dijalankan.
3. Menampilkan bilangan genap:
Jika i genap, program akan mencetak nilai i ke konsol.
Hasil:
0 2 4 6
4.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Jika kondisi pada perulangan "while" bernilai salah, maka perulangan akan berhenti
BENAR
SALAH
5.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Dalam perulangan do/while kode program di dalamnya akan dijalankan minimal satu kali
BENAR
SALAH
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Struktur perulangan apa yang paling tepat digunakan untuk mencetak bilangan ganjil dari 1 hingga 20?
for i in range(1, 21)
for i in range(1, 21, 2)
for i in range(2, 21, 2)
while i <= 20:
while i % 2 != 0:
Answer explanation
Struktur perulangan for dengan langkah iterasi 2 akan mencetak bilangan ganjil dari 1 hingga 20.
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Berikut adalah contoh kode Python untuk mengulangi elemen-elemen dalam sebuah array. Manakah yang merupakan variabel iterasi dalam kode ini....
array
element
print(element)
1, 2, 3, 4, 5
len(array)
Answer explanation
Variabel iterasi dalam kode ini adalah element. Variabel ini digunakan untuk mengakses elemen-elemen dalam array array satu per satu pada setiap iterasi loop.
Create a free account and access millions of resources
Similar Resources on Quizizz
25 questions
UH - Perulangan

Quiz
•
10th Grade
25 questions
UTS Pemrograman Dasar

Quiz
•
10th Grade
20 questions
Evaluasi 1

Quiz
•
10th Grade
20 questions
Pemrograman Dasar 3

Quiz
•
9th - 12th Grade
22 questions
Soal Pemograman C++

Quiz
•
9th - 12th Grade
20 questions
Pretest

Quiz
•
10th Grade
20 questions
UH Pygame - Vol. 1

Quiz
•
9th - 12th Grade
25 questions
UH2-DPKGANJIL2024

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade