K1 - Pemrograman Web
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Muhammad Davi
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Berikut beberapa aturan penamaan variabel, aturan yang benar pada bahasa pemrograman PHP adalah?
1. Diawali dengan karakter dolar ($) dan diikuti dengan nama pengenal
2. Nama pengenal dimulai dengan huruf atau garis bawah (_)
3. Boleh diawali dengan angka
4. Tidak boleh mengandung spasi
5. Bersifat case sensitive (huruf besar dan kecil dibedakan)
6. Tidak ada minimal karakter
1-2-3-4-5-6
1-2-3-4-5
1-3-4-5-6
1-2-4-5
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Format percabangan if - elseif - if yang benar adalah?
if (ekspresiA) {
statement1;
} else if (ekspresiB) { statement2;
}
if (ekspresiA) {
statement1;
} else if (ekspresiB) {
statement1;
} else {
statement1;
}
if (ekspresiA)
statement1;
} elseif (ekspresiB) {
statement1;
} else {
statement1;
}
if (ekspresiA) { statement1;
} elseif (ekspresiB) {
statement2;
} else {
statement3;
}
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Format percabangan switch yang benar adalah?
switch ($variable) {
case value_1:{
statement1;
break;
}
default{
statement3;
break;
}
switch ($variable) {
case value_1:
statement1;
break;
case value_2:
statement2;
break;
default:
statement3;
break;
}
switch ($variable) {
case value_1:
statement1;
break;
defeult:
statement3;
break;
}
switch ($variable)
case value_1:
statement1;
break;
case value_2:
statement2;
break;
default:
statement3;
break;
4.
MULTIPLE SELECT QUESTION
10 sec • 1 pt
Format perulangan for dan foreach yang benar adalah? (pilih 2)
for (increment; condition; inisialisasi) {
}
for (inisialisasi; condition; increment) {
statement;
}
foreach ($var_array as $var) {
statement;
}
foreach ($var_array as $var)
statement;
}
5.
MULTIPLE SELECT QUESTION
10 sec • 1 pt
Format perulangan while dan do while yang benar adalah? (pilih 2)
while(inisialisasi;) {
statement;
increment;
}
inisialisasi;
do {
statement;
increment;
} while(condition)
do (inisialisasi;) {
increment;
} while(condition)
inisialisasi; while(condition) {
statement;
increment;
}
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Fungsi tambahSatu tersebut menghasilkan output?
Error
$a
5
6
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Kode untuk membuat array yang benar adalah?
$nama = array["Nafisah", "Luthfi", "Maisha", "Faiza"];
$nama = ("Nafisah", "Luthfi", "Maisha", "Faiza");
$nama = {"Nafisah", "Luthfi", "Maisha", "Faiza"}
$nama = array("Nafisah", "Luthfi", "Maisha", "Faiza");
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
