
Asesmen awal element pemrograman terstuktur
Authored by mr putrakesuma
Computers
10th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Berikut adalah kode HTML dan JavaScript:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 1</title>
</head>
<body>
<button id="btn1" onclick="myFunction()">Klik Saya</button>
<script>
var counter = 0;
function myFunction() {
counter++;
console.log(counter);
}
</script>
</body>
</html>
Apa output yang akan ditampilkan di konsol ketika tombol "Klik Saya" diklik tiga kali?
1 1 1
1 2 3
1 1 2
1 2 2
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Diberikan kode HTML berikut:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 2</title>
</head>
<body>
<button id="btn1" onclick="changeText()">Klik Saya</button>
<p id="text">Halo, dunia!</p>
<script>
function changeText() {
var textElement = document.getElementById("text");
textElement.innerHTML = "Selamat datang!";
}
</script>
</body>
</html>
Apa yang akan terjadi ketika tombol "Klik Saya" diklik?
Paragraf akan berubah menjadi "Klik Saya".
Paragraf akan menghilang.
Paragraf akan berubah menjadi "Selamat datang!"
Tombol akan menghilang.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Berikut adalah kode HTML dan JavaScript:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 3</title>
</head>
<body>
<button id="btn1" onclick="toggleVisibility()">Klik Saya</button>
<p id="text" style="display: none;">Teks yang disembunyikan.</p>
<script>
function toggleVisibility() {
var textElement = document.getElementById("text");
if (textElement.style.display === "none") {
textElement.style.display = "block";
} else {
textElement.style.display = "none";
}
}
</script>
</body>
</html>
Apa yang akan terjadi ketika tombol "Klik Saya" diklik dua kali?
Paragraf akan muncul dan tetap terlihat.
Paragraf akan muncul dan kemudian menghilang kembali.
Paragraf akan tetap disembunyikan.
Paragraf akan muncul dan berkedip beberapa kali.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Berikut adalah kode HTML dan JavaScript:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 4</title>
</head>
<body>
<button id="btn1" onclick="incrementCounter()">Klik Saya</button>
<p id="counter">0</p>
<script>
var counter = 0;
function incrementCounter() {
counter++;
document.getElementById("counter").innerHTML = counter;
}
</script>
</body>
</html>
Apa yang akan terjadi ketika tombol "Klik Saya" diklik empat kali?
Paragraf akan berubah menjadi "4".
Paragraf akan berubah menjadi "1".
Paragraf akan berubah menjadi "5".
Paragraf akan tetap berisi "0".
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Berikut adalah kode HTML dan JavaScript:
Berikut adalah kode HTML dan JavaScript:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 5</title>
</head>
<body>
<input type="text" id="inputField" onkeyup="showValue()">
<p id="output">Hasil: </p>
<script>
function showValue() {
var inputElement = document.getElementById("inputField");
var outputElement = document.getElementById("output");
outputElement.innerHTML = "Hasil: " + inputElement.value;
}
</script>
</body>
</html>
Apa yang akan terjadi saat Anda mengetikkan "Hello, world!" di kotak input?
Paragraf akan berubah menjadi "Hasil: Hello, world!".
Paragraf akan berubah menjadi "Hasil: world!".
Paragraf akan berubah menjadi "Hasil: Hello,".
Paragraf akan tetap berisi "Hasil: ".
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Berikut adalah kode HTML dan JavaScript:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 6</title>
</head>
<body>
<button id="btn1" onclick="disableButton()">Klik Saya</button>
<script>
function disableButton() {
document.getElementById("btn1").disabled = true;
}
</script>
</body>
</html>
Apa yang akan terjadi ketika tombol "Klik Saya" diklik?
Tombol akan menghilang.
Tombol akan berubah menjadi teks "Klik Saya".
Tombol akan menjadi tidak dapat diklik (disabled)
Tidak ada yang terjadi.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Berikut adalah kode HTML dan JavaScript:
html
<!DOCTYPE html>
<html>
<head>
<title>Contoh Soal 7</title>
</head>
<body>
<button id="btn1" onclick="changeColor()">Klik Saya</button>
<script>
function changeColor() {
document.getElementById("btn1").style.backgroundColor = "red";
}
</script>
</body>
</html>
Apa yang akan terjadi ketika tombol "Klik Saya" diklik?
Tombol akan berubah menjadi merah.
Tombol akan menghilang.
Tidak ada perubahan pada tombol.
Tombol akan berubah menjadi biru.
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
10 questions
Soal Latihan 2 - Scratch
Quiz
•
8th - 12th Grade
13 questions
Викторина по информатике
Quiz
•
9th - 11th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
10 questions
Ulangan Komunikasi Daring
Quiz
•
10th Grade
10 questions
Назад в 90-е
Quiz
•
5th - 11th Grade
10 questions
Soal Ujian Komputer
Quiz
•
10th - 12th Grade
15 questions
Basics in Java
Quiz
•
9th - 12th Grade
15 questions
PrePost Mail Merge
Quiz
•
10th Grade
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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