
Câu hỏi về lập trình Python
Quiz
•
Computers
•
10th Grade
•
Hard
Tran Khuu
Used 6+ times
FREE Resource
Enhance your content in a minute
23 questions
Show all answers
1.
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 print(kq)
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
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Pretest TIK
Quiz
•
10th Grade
20 questions
Intro to Visual Basic
Quiz
•
10th Grade - University
20 questions
KTTX HK2 _K12
Quiz
•
10th Grade
18 questions
12AIT - All About W3C <3
Quiz
•
10th Grade - University
20 questions
Một số lệnh làm việc với xâu kí tự
Quiz
•
10th Grade
20 questions
HTML & CSS Quiz
Quiz
•
10th - 11th Grade
20 questions
Isolation 2020
Quiz
•
7th - 12th Grade
20 questions
Циклы в Паскале
Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
