
TA MODUL 3 (VERSI 3)
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Ibes Ibes
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Diberikan tuple berikut:
```
t = (1, 2, [3, 4])
t[2][0] = 5
```
Apa yang terjadi?
TypeError karena tuple immutable
List dalam tuple berubah menjadi [5, 4]
Tuple berubah menjadi (1, 2, [5, 4])
SyntaxError
Answer explanation
Meskipun tuple immutable, list di dalamnya tetap mutable dan bisa diubah.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa output dari kode berikut?
```
text = "Hello\tWorld"
print(len(text))
```
10
11
9
12
Answer explanation
'\t' dihitung sebagai satu karakter, sehingga total panjangnya 11.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Perhatikan kode berikut:
```
s = "Python Programming"
print(s.find('gram'))
```
Apakah output yang dihasilkan?
8
9
10
-1
Answer explanation
'gram' dimulai pada indeks 9 dalam string "Python Programming".
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bagaimana cara yang benar untuk menghapus item dari dictionary?
```
d = {'a': 1, 'b': 2}
```
d.remove('a')
d.delete('a')
del d['a']
d.pop()
Answer explanation
del adalah cara yang benar untuk menghapus item dari dictionary.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa output dari kode berikut?
```
s = set([1, 2, 2, 3, 3, 3])
print(len(s))
```
6
3
2
Error
Answer explanation
Set menghilangkan duplicate elements, sehingga hanya menyimpan nilai unik.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Manakah cara yang benar untuk menggabungkan dua tuple?
tuple1.append(tuple2)
tuple1.extend(tuple2)
tuple1 + tuple2
tuple1.join(tuple2)
Answer explanation
Operator + digunakan untuk menggabungkan tuple.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Perhatikan kode berikut:
```
s = "Hello"
s[0] = "h"
```
Apa yang terjadi?
String berubah menjadi "hello"
TypeError
SyntaxError
ValueError
Answer explanation
String bersifat immutable, tidak bisa diubah per karakter.
Create a free account and access millions of resources
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
Post Test #3 - Python Fundamental #2
Quiz
•
University
10 questions
Quiz Pemrograman Dasar
Quiz
•
University
14 questions
Java Operators
Quiz
•
University
10 questions
Python Basics
Quiz
•
University
10 questions
Post Test #4 - Python Fundamental #3
Quiz
•
University
10 questions
DS UNIT-2 TEST-3
Quiz
•
University
10 questions
Data Analytics using Python - Quiz 1
Quiz
•
University
15 questions
Quiz 4 Week 6 Repetition Structures (For)
Quiz
•
University
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
34 questions
Unit 5 Review - The Middle Ages in Europe-B
Quiz
•
9th Grade - University
26 questions
Day2 classwork: Permutation and combination
Quiz
•
2nd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
