
Bài Xâu Kí Tự

Quiz
•
Computers
•
10th Grade
•
Hard
Dũng Quốc Trần
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sau khi thực hiện lệnh sau, biến s sẽ có kết quả là:
s1 ="3986443"
s2 = ""
for ch in s1:
if int(ch) % 2 == 0:
s2 = s2 + ch print(s2)
3986443
8644
39864
443
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Biểu thức sau cho kết quả đúng hay sai?
S1 = “12345”
S2 = “3e4r45”
S3 = “45”
S3 in S1
S3 in S2
True, False.
True, True.
False, False.
False, True.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của chương trình sau nếu s = “python1221” là gì?
s = input("Nhập xâu kí tự bất kì:")
kq = False
for i in range(len(s)-1):
if s[i] == "2" and s[i+1] == "1":
kq = True
break
True.
False.
Chương trình bị lỗi.
Vòng lặp vô hạn.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chương trình sau cho kết quả là bao nhiêu?
name = "Codelearn"
print(name[0])
“C”.
“o”.
“c”.
Câu lệnh bị lỗi.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của chương trình sau là bao nhiêu?
>>> s = “0123145”
>>> s[0] = ‘8’
>>> print(s[0])
‘8’.
‘0’.
‘1’.
Chương trình bị lỗi.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của chương trình sau là bao nhiêu?
>>> s = “abcdefg”
>>> print(s[2])
‘c’.
‘b’.
‘a’.
‘d’
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho xâu s = "lập trình Python"
Để in xâu s ra màn hình ta dùng đoạn chương trình:
for i in range(15):
print(s[i], end = '')
for i in range(len(s)):
print(s[i], end = '')
for i in range(len(s -1)):
print(s[i], end = '')
for i in range(len(s)-1):
print(s[i], end = '')
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
KTGK. Bài 16. NNLT trình ngôn ngữ và python

Quiz
•
10th Grade
10 questions
QBASIC Programming

Quiz
•
5th - 10th Grade
15 questions
Python Unit 8 Quiz

Quiz
•
9th - 12th Grade
20 questions
Untitled Quiz

Quiz
•
10th Grade
10 questions
Luyện tập

Quiz
•
10th Grade
20 questions
kiểm tra kiểu xâu

Quiz
•
9th - 12th Grade
15 questions
Ôn tập KTGK. Bài 18. Các lệnh vào ra đơn giản

Quiz
•
10th Grade
17 questions
Bài 24

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade