
TA MODUL 2 (VERSI 2)

Quiz
•
Other
•
University
•
Medium
Ibes Ibes
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa output dari kode berikut?
0 1 2 3 4
0 1 3 4
1 2 3 4
0 1 2 4
Answer explanation
Statement 'continue' melewati iterasi saat i = 2 dan melanjutkan ke iterasi berikutnya.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dalam Python, bagaimana cara menghentikan perulangan while secara paksa?
exit
break
stop
return
Answer explanation
Statement 'break' digunakan untuk menghentikan perulangan secara paksa.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lengkapi kode berikut agar menghasilkan fungsi yang valid:
return
yield
pass
Answer explanation
'return' digunakan untuk mengembalikan nilai dari suatu fungsi.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bagaimana cara yang benar untuk membuat perulangan yang mengiterasi string "Hello"?
for i in range("Hello"):
for i in "Hello":
while i in "Hello":
loop through "Hello":
Answer explanation
String adalah iterable, sehingga bisa langsung diiterasi dengan for loop.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dalam perulangan for, fungsi range(5) akan menghasilkan:
1, 2, 3, 4, 5
0, 1, 2, 3, 4
0, 1, 2, 3, 4, 5
1, 2, 3, 4
Answer explanation
range(5) menghasilkan sequence dari 0 sampai 4 (5 tidak termasuk).
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apakah output dari kode berikut?
3
13
23
Error
Answer explanation
a=1, b=2, dan c menggunakan nilai default 10, sehingga 1+2+10=13.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lengkapi kode berikut agar menghasilkan fungsi lambda yang menjumlahkan dua angka:
add = ____ x,y: x + y
func
lambda
def
function
Answer explanation
'lambda' adalah keyword untuk membuat anonymous function.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
DAA-CT 2

Quiz
•
University
10 questions
Kuis IBM 2#

Quiz
•
University
10 questions
Core Value BerAKHLAK Quiz

Quiz
•
University
10 questions
Javascript тілі

Quiz
•
University
10 questions
Kuis Profesi dan Pendidikan

Quiz
•
University
15 questions
Quiz 04 Mengenal System Operasi Linux

Quiz
•
University
10 questions
Կայքերի ստեղծում - Դաս 4

Quiz
•
4th Grade - University
12 questions
Conditional Statements : Quiz - 4

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University