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
20 questions
Quiz Scratch Vs Blockly

Quiz
•
9th Grade - University
25 questions
Algorithma dan Pemrograman

Quiz
•
10th Grade
20 questions
Quiz Pemrograman Phyton

Quiz
•
9th - 12th Grade
25 questions
UH PEMROGRAMAN DASAR 1

Quiz
•
10th - 12th Grade
20 questions
Praktik Lintas Bidang Informatika

Quiz
•
10th Grade
20 questions
Pemrograman Terstruktur

Quiz
•
10th Grade
20 questions
C++ (Part 2)

Quiz
•
10th Grade
20 questions
Python Basics 2

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University