
Trắc nghiệm xâu ký tự trong Python
Authored by Đặng 2
Instructional Technology
10th Grade
Used 1+ times

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
Trong Python, kiểu dữ liệu nào dùng để lưu trữ xâu ký tự?
int
float
str
list
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào để in ra màn hình xâu "Hello, Python"?
echo("Hello, Python")
print("Hello, Python")
printf("Hello, Python")
output("Hello, Python")
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì? s = "Python" print(s[1])
P
y
t
h
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, chỉ số âm trong xâu ký tự bắt đầu đếm từ ký tự cuối cùng về trước.
Đúng
Sai
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào trả về độ dài của xâu `s`?
length(s)
len(s)
size(s)
count(s)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì? s = " Hello World " print(s.strip())
" Hello World "
"Hello World"
"hello world"
"HelloWorld"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn code nào trả về phần xâu "thon" từ biến `s = "Python"`?
s[2:6]
s[3:7]
s[1:5]
s[-3:]
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?