
ôn tập giữa kì 2: Xâu kí tự

Quiz
•
Other
•
10th Grade
•
Medium
Hiềm duongthihiem@gmail.com
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Hoàn thành câu lệnh sau để in ra chiều dài của xâu:
x = "Hello World"
print(…)
len(x).
x. len().
copy(x).
x. length().
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho xâu s = “1, 2, 3, 4, 5”. Muốn xoá bỏ kí tự “,” và thay thế bằng dấu “ ” ta sử dụng lần lượt những câu lệnh nào?
remove() và join().
del() và replace().
split() và join().
split() và replace().
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho xâu s = "Python". Muốn chuyển thành xâu s = "P y t h o n" ta cần làm sử dụng những câu lệnh:
split() và join().
split() và replace().
del() và replace().
replace().
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chương trình sau cho ra kết quả là gì
greeting = 'Good '
time = 'Afternoon'
greeting = greeting + time + '!'
print(greeting)
‘GoodAfternoon’.
‘GoodAfternoon!’.
Chương trình báo lỗi.
‘Good Afternoon !’
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của chương trình sau là gì?
line = "Geek1 Geek2 Geek3"
print(line.split())
print(line.split(' ', 1))
['Geek1', 'Geek2', 'Geek3']
['Geek1', 'Geek2 Geek3'].
['Geek1', 'Geek2', 'Geek3']
['Geek1', 'Geek2', 'Geek3'] .
['Geek1 Geek2', 'Geek3']
['Geek1', 'Geek2', 'Geek3'].
['Geek1 Geek2', 'Geek3']
['Geek1', 'Geek2 Geek3'].
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh sau trả lại giá trị gì? "0123456789".find("012abc")
-1.
0.
1.
Báo lỗi.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh sau trả lại giá trị gì?
>> “abcdabcd”. find(“cd”)
>> “abcdabcd”. find(“cd”, 4)
2, 6.
3, 3.
2, 2.
2, 7.
Create a free account and access millions of resources
Similar Resources on Wayground
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
29 questions
CCG 2.2.3 Area

Quiz
•
9th - 12th Grade
10 questions
SAT Focus: Geometry

Quiz
•
10th Grade
15 questions
PRESENTE CONTINUO

Quiz
•
9th - 12th Grade