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 print(kq)

Câu hỏi về lập trình Python

Quiz
•
Computers
•
10th Grade
•
Hard
Tran Khuu
Used 5+ times
FREE Resource
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True.
False.
Chương trình bị lỗi.
Vòng lặp vô hạn.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Xâu rỗng là xâu có độ dài bằng bao nhiêu?
1.
2.
0.
3.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chương trình trên giải quyết bài toán gì? s = "" ư s = s + str(i) print(s)
In một chuỗi kí tự từ 0 tới 10.
In một chuỗi kí tự từ 0 tới 9.
In một chuỗi kí tự từ 1 tới 10.
In một chuỗi kí tự từ 1 đến 9.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để biết độ dài của xâu s ta dùng hàm gì?
str(s).
len(s).
length(s).
s.len().
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Có bao nhiêu xâu kí tự nào hợp lệ? 1) "123_@##" 2) "hoa hau" 3) "346h7g84jd" 4) python 5) "01028475" 6) 123456
5.
6.
4.
3
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho s = "123456abcdefg", s1 = "124", s2 = "235", s3 = "ab", s4 = "56" + s3 Có bao nhiêu biểu thức lôgic sau đúng? 1) s1 in s. 2) s2 in s. 3) s3 in s. 4) s4 in s.
1.
2.
3.
4.
7.
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'.
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
3inf_Automa_Linguaggi_Algoritmo

Quiz
•
10th Grade
20 questions
ÔN TẬP HK2-Trắc nghiệm Python

Quiz
•
10th Grade
21 questions
ÔN TẬP KIỂU XÂU

Quiz
•
1st - 12th Grade
19 questions
Ôn tin 10

Quiz
•
10th Grade
20 questions
tin học quang minh đẹp trai siêu cấp vũ trụ 7 dải ngân hà

Quiz
•
10th Grade
26 questions
Ôn tập HK2

Quiz
•
10th Grade
20 questions
Một số lệnh làm việc với xâu kí tự

Quiz
•
10th Grade
21 questions
Ôn tập cuối kì Đông. Python

Quiz
•
10th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Computers
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
65 questions
MegaQuiz v2 2025

Quiz
•
9th - 12th Grade
10 questions
GPA Lesson

Lesson
•
9th - 12th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade