Kết quả của đoạn code sau là gì?
my_list = [1, 2, 3]
my_list.append([4, 5])
print(my_list)
List | Set | String - Nâng cao (1)
Quiz
•
Information Technology (IT)
•
6th - 8th Grade
•
Medium
Khang Nghĩa
Used 11+ times
FREE Resource
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì?
my_list = [1, 2, 3]
my_list.append([4, 5])
print(my_list)
[1, 2, 3, 4, 5]
[1, 2, 3, [4, 5]]
[1, 2, 3, 4, [5]]
Lỗi
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cách nào để truy xuất phần tử cuối cùng của list `lst = [10, 20, 30, 40]?`
lst[4]
lst[-1]
lst[len(lst)]
lst.last()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào xóa phần tử đầu tiên của list `a = [5, 10, 15, 20]`?
a.remove(5)
del a[0]
a.pop(0)
cả b và c đề đúng
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì?
lst = [1, 2, 3, 4]
lst.insert(2, 100)
print(lst)
[1, 2, 100, 3, 4]
[1, 100, 2, 3, 4]
[1, 2, 3, 4, 100]
[100, 1, 2, 3, 4]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào dùng để tạo một bản sao của list a = [1, 2, 3]?
b = a
b = a.copy()
b = list(a)
a, b và c đều đúng
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì?
s = "Hello World"
print(s[::-1])
"dlroW olleH"
"Hello World"
"H"
"d"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cách nào để nối chuỗi s1 = "Hello" và s2 = "World" thành "Hello World"?
s1 + s2
s1.join(s2)
s1 + " " + s2
s1.concat(s2)
19 questions
TH lop 5
Quiz
•
3rd Grade - University
25 questions
Kiến thức về Microsoft PowerPoint - 1
Quiz
•
7th Grade
19 questions
ÔN TẬP GKI TIN 8
Quiz
•
8th Grade
20 questions
Python 8 klasa
Quiz
•
8th Grade
25 questions
KTCKI TIN 8
Quiz
•
8th Grade
20 questions
Thử thách 9 - đường đua lập trình - tin 7
Quiz
•
7th Grade
20 questions
Thử thách 7 - đường đua lập trình
Quiz
•
7th Grade
20 questions
ÔN TẬP TIN 8 CUỐI KÌ 1
Quiz
•
8th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
20 questions
Final Exam Vocabulary
Quiz
•
6th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
11 questions
Decimal/fraction conversions quick check
Quiz
•
5th - 7th Grade
10 questions
Identifying equations
Quiz
•
KG - University
44 questions
El fin del año- 7th
Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary
Quiz
•
8th Grade
49 questions
How Well Do You Know Your 6th Grade Teachers?
Quiz
•
6th Grade