Một số lệnh làm việc với xâu kí tự

Quiz
•
Computers
•
10th Grade
•
Hard
Yến Lâm
Used 12+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh nào sau đây dùng để tách xâu:
len()
find()
join()
split()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sử dụng lệnh nào để tìm vị trí của một xâu con trong xâu khác?
test()
split()
in()
find()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của các câu lệnh sau là gì?
s = "12 34 56 ab cd de "
print(s. find(" "))
print(s.find("12"))
print(s. find("34"))
2, 0, 3
2, 1, 3
3, 5, 2
1, 4, 5
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Lệnh sau trả lại giá trị gì?
>>> s = "0123456789"
>>> s.find("abc")
0
-1
1
Báo lỗi
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, để cho ra kết quả là độ dài xâu ta sử dụng hàm nào sau đây?
len(<tên biến xâu>)
find(<tên biến xâu>)
Lower(<tên biến xâu>)
upper(<tên biến xâu>)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của chương trình sau là gì?
a = "Hello"
b = "world"
c = a + " " + b
print(c)
hello world
Hello World
Hello world
Helloworld
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Muốn nối danh sách gồm các từ thành một xâu ta dùng lệnh nào?
len()
find()
split()
join()
Create a free account and access millions of resources
Similar Resources on Wayground
17 questions
ÔN TẬP CUỐI KỲ II TIN 8

Quiz
•
8th - 11th Grade
20 questions
10. KIEU XAU KI TU (4)

Quiz
•
10th Grade
15 questions
kiểm tra lớp 5

Quiz
•
1st - 12th Grade
20 questions
KTTX Tin Học 10 lần 3 HK2

Quiz
•
10th Grade
20 questions
2324TX5

Quiz
•
9th - 12th Grade
15 questions
KNTT 10 BÀI 24

Quiz
•
10th Grade
15 questions
ÔN TẬP GKII (3)

Quiz
•
10th Grade
20 questions
Kiểm tra kiến thức về Python

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade