Search Header Logo

Câu hỏi về xâu ký tự trong Python

Other

1st Grade

Used 1+ times

Câu hỏi về xâu ký tự trong Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Xâu ký tự (chuỗi) trong lập trình là gì?

Một dãy các số nguyên

Một dãy các ký tự liên tiếp nhau

Một biến lưu trữ duy nhất một ký tự

Một kiểu dữ liệu chỉ chứa số thực

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Python, ký hiệu nào được sử dụng để biểu diễn một xâu ký tự?

"" hoặc ''

[]

{}

()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Kết quả của biểu thức sau trong Python là gì? s = "Tin hoc 10" print(len(s))

8

9

10

11

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cho đoạn mã sau: s = "TinHoc10" print(s[3]) Kết quả của chương trình là:

H

h

o

c

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Đâu là cách đúng để nối hai chuỗi "Hello" và "World" trong Python?

"Hello" + "World"

"Hello" . "World"

concat("Hello", "World")

"Hello" * "World"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Ký tự nào dùng để xuống dòng trong chuỗi?

\t

\n

\\

\r

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Python, phương thức nào được dùng để biến chuỗi "hello" thành "HELLO"?

upper()

lower()

capitalize()

title()

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?