Trong Python, câu lệnh nào dùng để tính độ dài của xâu s?

Câu hỏi về Python

Quiz
•
Computers
•
10th Grade
•
Medium
Lê Thư
Used 3+ times
FREE Resource
46 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
len(s).
length(s).
s.len().
s. length().
2.
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
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Xâu "1234%^^%TFRESDRG" có độ dài bằng bao nhiêu?
16.
17.
18.
15.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Phát biểu nào sau đây là sai?
Có thể truy cập từng kí tự của xâu thông qua chỉ số.
Chỉ số bắt đầu từ 0.
Có thể thay đổi từng kí tự của một xâu.
Python không có kiểu dữ liệu kí tự.
5.
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.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Biểu thức sau cho kết quả đúng hay sai?
True, False.
True, True.
False, False.
False, True.
7.
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.
Create a free account and access millions of resources
Similar Resources on Quizizz
42 questions
TN tin qh

Quiz
•
10th Grade
41 questions
ÔN TẬP GK2 - TIN HỌC 10

Quiz
•
10th Grade
50 questions
Ôn tập CK 2

Quiz
•
10th Grade - University
43 questions
Bài 4, 6 chủ đề F tin 10

Quiz
•
10th Grade
46 questions
Ôn tập

Quiz
•
10th Grade - University
50 questions
TIN HỌC 10 HK2

Quiz
•
10th - 12th Grade
50 questions
Tin 10_Kiểu Dữ Liệu Danh Sách trong Python

Quiz
•
10th Grade
50 questions
Ôn Tập HK2 môn Tin học 10

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University