
UH DPPLG - Python 2
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Medium
Nella Ambarwati
Used 13+ times
FREE Resource
Enhance your content in a minute
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
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
20 questions
Komjardas KD 10
Quiz
•
10th Grade
20 questions
Sains Komputer Tingkatan 5 - 1.3.1 Menerangkan get logik
Quiz
•
1st Grade - Professio...
20 questions
Latihan 1 SKD (06-21)
Quiz
•
10th Grade
20 questions
2324tx6
Quiz
•
9th - 12th Grade
20 questions
QUIZ BAB 4: SISTEM OPERASI
Quiz
•
8th Grade - University
20 questions
KELAS 7 1
Quiz
•
9th - 12th Grade
20 questions
ULANGAN FORMATIF 1
Quiz
•
10th Grade
20 questions
PSTS INFORMATIKA X
Quiz
•
10th Grade - University
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
