
TA MODUL 3 (VERSI 3)
Authored by Ibes Ibes
Computers
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
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
15 questions
ARRAYS AND FUNCTIONS
Quiz
•
University
10 questions
Python Generators
Quiz
•
10th Grade - University
10 questions
Strings y listas en Python
Quiz
•
University
11 questions
C/C++ Programming Chapter 3
Quiz
•
University
10 questions
Java Arrays
Quiz
•
University
10 questions
Intro to Python
Quiz
•
KG - University
15 questions
Word/Word Online for Beginners
Quiz
•
3rd Grade - Professio...
10 questions
Python Basics
Quiz
•
12th 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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University