
Câu hỏi về xâu trong Python
Authored by Huỳnh Kim Bằng
Computers
10th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Khai báo nào sau đây là đúng với dữ liệu kiểu xâu?
s=Xâu ABC
s= “Xâu ABC”
“Xâu ABC”=s
s=[“Xâu ABC”,1]
2.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Trong Python, xâu được khai báo bằng những dấu nào? (Chọn nhiều đáp án)
Dấu nháy đơn ' '
Dấu nháy đôi " "
Dấu ngoặc [ ]
Dấu ngoặc ( )
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Lệnh nào sau đây dùng để tạo một xâu rỗng?
s = ""
s = ''
s = str()
Cả ba đáp án đều đúng
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Xâu "Tin học" có bao nhiêu ký tự (tính cả khoảng trắng)?
5
6
7
8
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Lệnh nào dưới đây dùng để lấy độ dài của xâu s trong Python?
length(s)
size(s)
s.len()
len(s)
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Cách nào sau đây có thể lấy ký tự đầu tiên của xâu s?
s[len(s)]
s[0]
s[len(s)-2]
s[1]
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Trong Python, nếu gán s1 = "hello" rồi thực hiện s2 = s1, sau đó thay đổi s1 = "hi", thì giá trị của s2 là gì?
"hello"
"hi"
"" (xâu rỗng)
Lỗi
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
8 questions
Gathering Evidence
Quiz
•
9th - 12th Grade
15 questions
Quis Grade 5
Quiz
•
9th - 12th Grade
11 questions
Social Engineering
Quiz
•
10th Grade
12 questions
ECS Computer Components
Quiz
•
9th - 10th Grade
15 questions
SOAL KOMPUTER KELAS 8 SEMESTER GANJIL
Quiz
•
7th - 12th Grade
10 questions
Network
Quiz
•
10th - 11th Grade
10 questions
Anime
Quiz
•
KG - University
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade