Search Header Logo

hoạt động luyện tập

Authored by pham luyen

Other

10th Grade

Used 2+ times

hoạt động luyện tập
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 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 không?

A. test().

B. in().

C. find().

D. split().

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Kết quả của các câu lệnh sau lần lượt là:

s = "12 34 56 ab cd de "

print(s. find(" "))

print(s.find("12"))

print(s. find("34"))

A. 2, 0, 3.

B. 2, 1, 3.

C. 3, 5, 2.

D. 1, 4, 5.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh sau trả lại giá trị gì?

“abcdabcd”. find(“cd”)

“abcdabcd”. find(“cd”, 4)

A. 2, 6.

B. 3, 3.

C. 2, 2

C. 2, 2

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào sau đây dùng để tách xâu:

A. split()

B. join()

C. remove()

D. copy().

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Python, câu lệnh nào dùng để tính độ dài của xâu s?

A. len(s).

B. length(s).

C. s.len().

D. s. length().

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Kết quả của chương trình sau là gì?

>>> s = “Một năm có bốn mùa”

>>> s.split()

>>> st = “a, b, c, d, e, f, g, h”

>>> st.split()

‘Một năm có bốn mùa’, [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’].

[‘Một’, ‘năm’, ‘có’, ‘bốn’, ‘mùa’], [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’].

‘Một năm có bốn mùa’, ‘abcdefgh’

[‘Một’, ‘năm’, ‘có’, ‘bốn’, ‘mùa’], ‘abcdefgh’.

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?