Module 1 Exercise (Python)

Quiz
•
Computers
•
Professional Development
•
Hard
Median Hardiv
Used 36+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Apa output dari kode ini:
x = 0
print type(type(x))?
type 'int'
type 'type'
Error
0
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
nama = input('Masukkan nama anda: ')
umur = input('Masukkan umur anda: ')
print('{} lahir pada tahun {}'.format(nama, 2023 - umur))
Jika user memasukkan Messi dan 35 pada terminal, output yang tepat berdasarkan kode di atas adalah
{nama} lahir pada tahun {2023 - umur}
Messi lahir pada tahun 35
Messi lahir pada tahun 1988
Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
listBuah = [['Mangga', 'Jeruk', 'Pepaya', 'Pisang'], 'Timun', 'Terong', 'Labu', 'Anggur']
print(listBuah[1][3])
Apa output dari kode di atas?
'Pepaya'
'u'
'Labu'
tidak ada jawaban benar
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Apa output dari kode berikut?
0
1
2
4
5
7
8
0
3
6
9
1
2
4
5
7
8
Tidak ada jawaban benar
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
kalimat = 'Selamat Datang di Purwadhika"
print(kalimat.capitalize())
Output dari kode di atas adalah
selamat datang di purwadhika
SELAMAT DATANG DI PURWADHIKA
Selamat Datang Di Purwadhika
Selamat datang di purwadhika
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
yellow = ["Pisang", "Jeruk", "Lemon"]
red = ["Apel", "Tomat", "Stroberi"]
yellow.append(red)
print(yellow)
Output dari kode di atas adalah
["Pisang", "Jeruk", "Lemon", "Apel", "Tomat", "Stroberi"]
["Pisang", "Jeruk", "Lemon", ["Apel", "Tomat", "Stroberi"]]
["Apel", "Tomat", "Stroberi", "Pisang", "Jeruk", "Lemon"]
["Apel", "Tomat", "Stroberi", ["Pisang", "Jeruk", "Lemon"]]
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Pernyataan paling tepat tentang function di bawah ini adalah
Function harus memiliki parameter
Tidak semua function harus diakhiri dengan () ketika dipanggil
Function bisa dipanggil di dalam function
Tidak ada jawaban benar
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Materi Komputasional Kelas X

Quiz
•
Professional Development
20 questions
UJI ULANGAN TIK KELAS 7

Quiz
•
Professional Development
21 questions
NumPy Quiz

Quiz
•
Professional Development
16 questions
A+ - 9C - Troubleshoot Print Device Issues

Quiz
•
Professional Development
25 questions
ulangan kelas 2

Quiz
•
Professional Development
22 questions
Python basics

Quiz
•
Professional Development
20 questions
Python Programming - Test 1

Quiz
•
University - Professi...
20 questions
Kuis Stase Kerumahsakitan Unit TI

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade