
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
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
Similar Resources on Wayground
24 questions
tin học

Quiz
•
10th Grade - University
28 questions
Python Programming Quiz

Quiz
•
10th Grade
20 questions
Kiểm tra kiến thức Python cơ bản - Phần 2

Quiz
•
10th Grade
20 questions
BÀI KIỂM TRA CUỐI KỲ II KHỐI 10

Quiz
•
10th Grade
18 questions
Символьные строки. Контрольный тест.

Quiz
•
10th Grade
20 questions
Tin 10 - Bài 12 CDF - Kiểu dữ liệu xâu kí tự

Quiz
•
10th Grade
22 questions
Tin học - Bài 25

Quiz
•
10th Grade - University
23 questions
ÔN TẬP GK2 TIN10

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

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

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade