Search Header Logo

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

Authored by Yến Lâm

Computers

10th Grade

Used 12+ times

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

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?