Search Header Logo

Python Programming Quiz

Authored by Ngọc Phan

Computers

2nd Grade

Used 1+ times

Python Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Nếu s = '1234567890' thì s[0:4] là gì?

'1234'

'12345'

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

s='Hello World'

x=....

Để x nhận kí tự đầu tiên của xấu S ta viết vào chỗ trống (...) là

s[1]

s(0)

Báo lỗi

s(1)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh 'abcd'.find('') trả lại giá trị gì?

1

0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Python, để đưa ra độ dài của xâu s ta viết:

print(len(s))

print(s.len)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Chương trình sau cho kết quả là:

S='Ha Noi mua thu'

B=S.split()

print(B)

[Ha, Noi, mua, thu]

[Ha Noi mua thu]

['Ha', 'Noi, 'mua, thu']

['Ha', 'Noi', 'mua', 'thu']

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cho s1 = 'abc', s2='ababcabca'. Biểu thức logic nào dưới đây cho kết quả sai?

s1*3 in s2

s1 in s2

s1+s1 in s2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Để đưa ra một đoạn con 'World' của xâu gốc s ='Hello World', ta viết:

print(s[6:])

print(s.len())

print(len(s))

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?