Search Header Logo

Bài tập trắc nghiệm Python cơ bản xâu

Authored by Edu TSmart

English

5th Grade

Used 14+ times

Bài tập trắc nghiệm  Python cơ bản xâu
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Kết quả của đoạn code sau là gì?

Có chữ e

Không có chữ e

Lỗi

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Đoạn mã nào kiểm tra một chuỗi có bắt đầu bằng chữ “a”?

if s[0] == "a":

if s[-1] == "a":

if "a" in s:

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Đoạn code sau in ra gì?

abc

a b c

c b a

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Kết quả của đoạn mã:

In ra True

In ra False

Không in gì

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào kiểm tra chuỗi s chứa đúng 10 ký tự?

if len(s) == 10:

if s.len() == 10:

if count(s) == 10:

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào in từng ký tự trong chuỗi s nếu nó là chữ hoa?

for c in s: if c.isupper(): print(c)

if c.isupper() for c in s:

print(s.upper())

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào đảo ngược chuỗi s bằng vòng lặp?

for i in range(len(s)): print(s[i])

for i in range(len(s)-1, -1, -1): print(s[i])

for i in s[::-1]: print(i)

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?