Quiz về kiểu dữ liệu Str

Quiz về kiểu dữ liệu Str

6th - 8th Grade

17 Qs

quiz-placeholder

Similar activities

петон

петон

8th Grade

21 Qs

Understanding Iteration and Selection

Understanding Iteration and Selection

7th Grade

20 Qs

4.1 Kod Arahan

4.1 Kod Arahan

1st Grade - University

16 Qs

quiz1B1

quiz1B1

7th Grade - University

20 Qs

Statements in Python

Statements in Python

8th Grade

20 Qs

PYTHON 1

PYTHON 1

6th - 8th Grade

21 Qs

Programski jezik Python

Programski jezik Python

8th Grade

17 Qs

Python Basics Quiz for Beginners

Python Basics Quiz for Beginners

6th Grade

18 Qs

Quiz về kiểu dữ liệu Str

Quiz về kiểu dữ liệu Str

Assessment

Quiz

Information Technology (IT)

6th - 8th Grade

Medium

Created by

Khang Nghĩa

Used 4+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

s = "Hello, world!"

print(len(s))

12

13

14

15

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cách nào dưới đây tạo một chuỗi rỗng?

s = " "

s = str()

s = ' '

Tất cả đều đúng.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào dùng để truy xuất ký tự đầu tiên của chuỗi s = "Python"?

s(0)

s[0]

s{0}

s.first()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

s = "Python"

print(s[-1])

P

n

o

h

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào dưới đây dùng để lấy chuỗi con "thon" từ chuỗi s = "Python"?

s[2:6]

s[-4:]

s[2:]

Cả ba cách.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

s = "Python"

print(s[: : -1]

"Python"

"nohtyP"

"n"

Lỗi.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào giúp nối hai chuỗi a = "Hello" và b = "World" thành "Hello World"?

a + b

a + " " + b

a.append(b)

a.join(b)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?