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
20 questions
Tin học 7 Excel

Quiz
•
7th - 12th Grade
16 questions
Kiểu Xâu

Quiz
•
8th - 11th Grade
15 questions
Ôn tập HK2 Python 10

Quiz
•
10th Grade
15 questions
Bài 22-Kiểu dữ liệu danh sách

Quiz
•
10th Grade
19 questions
Ôn tin 10

Quiz
•
10th Grade
21 questions
ÔN TẬP KIỂU XÂU

Quiz
•
1st - 12th Grade
20 questions
tin học quang minh đẹp trai siêu cấp vũ trụ 7 dải ngân hà

Quiz
•
10th Grade
20 questions
Python_if_else

Quiz
•
1st Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade