
UH DPPLG - Python 2

Quiz
•
Computers
•
10th Grade
•
Medium
Nella Ambarwati
Used 13+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
def hitung(a, b):
hasil = a * b
return hasil
print(hitung(3, 4))
Apa output yang dihasilkan dari kode diatas ?
12
7
3*4
None
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
Dalam konsep pemrograman terstruktur, struktur kontrol alur seperti percabangan if-elif-else digunakan untuk?
Mengulangi eksekusi kode secara terus-menerus
Menentukan alur eksekusi program berdasarkan kondisi tertentu
Mendefinisikan sebuah fungsi baru dalam Python
Menyimpan sekumpulan nilai dalam satu variabel
Mengubah tipe data suatu variabel
3.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
x = 10
if x > 5:
print("Besar")
else:
print("Kecil")
Apa output dari kode diatas ?
Besar
Kecil
Error
Tidak menghasilkan output
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
Apa fungsi dari pernyataan return dalam sebuah fungsi Python?
Menghentikan eksekusi program
Mengembalikan nilai dari fungsi ke pemanggilnya
Mencetak nilai ke layar
Menghapus variabel dalam fungsi
Menentukan tipe data variabel
5.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
for i in range(3):
print(i)
Apa output yang dihasilkan ?
0 1 2
1 2 3
0 1 2 3
3 2 1
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
Struktur perulangan while dalam Python digunakan untuk?
Menjalankan kode secara terus-menerus tanpa henti
Menjalankan kode selama kondisi tertentu masih terpenuhi
Melakukan perulangan dengan jumlah iterasi tetap
Menghentikan program saat terjadi kesalahan
Mengubah tipe data variabel
7.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
Apa yang akan terjadi jika tidak ada kondisi penghentian dalam perulangan while?
Program akan berjalan seperti biasa
Program akan menghasilkan error
Program akan masuk ke dalam infinite loop
Program akan langsung berhenti
Python akan secara otomatis menghentikan loop setelah 10 iterasi
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Algoritma Fungsi Phyton

Quiz
•
10th Grade
20 questions
Uji Pemahaman Komputasional

Quiz
•
10th Grade - University
20 questions
Pemrograman Dasar 3

Quiz
•
9th - 12th Grade
22 questions
TIK-9-Coding

Quiz
•
9th - 12th Grade
30 questions
ASESMEN TENGAH SEMESTER INFORMATIKA KELAS X - SMKN 52 JAKARTA

Quiz
•
10th Grade
30 questions
Latihan soal Akhir Semester satu

Quiz
•
9th Grade - University
20 questions
UJIAN AKHIR INFORMATIKA SEMESTER 2 KELAS 10 TA 2023/2024

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

Quiz
•
9th - 12th Grade
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 Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade