
Câu hỏi trắc nghiệm Python
Authored by Duy undefined
Others
KG
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
47 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, cách khai báo biến nào sau đây là đúng?
int x = 10
x : int = 10
x = 10
int x <- 10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh nào được sử dụng để in ra màn hình trong Python?
print()
output()
write()
display()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây là đúng cú pháp của lệnh rẽ nhánh trong Python?
if x > 5 print("x lớn hơn 5")
if x > 5: print("x lớn hơn 5")
if (x > 5) { print("x lớn hơn 5") }
if x > 5 then print("x lớn hơn 5")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh lặp for trong Python được sử dụng để làm gì?
Tạo điều kiện rẽ nhánh.
Lặp lại một khối lệnh theo số lần cố định hoặc duyệt qua các phần tử.
Gán giá trị cho biến.
Kết thúc chương trình.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn mã sau là gì? for i in range(3): print(i)
1 2 3
0 1 2
1 2
Lỗi.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sửa lỗi trong đoạn mã sau để in ra tổng các số từ 1 đến 100: total = 0 for i in range(1, 100): total += i print(total)
Thay range(1, 100) bằng range(1, 101).
Thay total += i bằng total = i.
Thay print(total) bằng return total.
Thêm if i < 100: vào vòng lặp.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để tránh vòng lặp vô hạn trong lệnh while, chúng ta cần:
Sử dụng hàm break.
Đảm bảo điều kiện của vòng lặp trở thành sai tại một thời điểm nào đó.
Sử dụng từ khóa continue.
Sử dụng vòng lặp for.
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
50 questions
Quiz o toksyczności i biologicznej dostępności
Quiz
•
University
47 questions
TOUFL UNTUK PACARKU
Quiz
•
2nd Grade
50 questions
Ujian Seni Budaya 9
Quiz
•
8th Grade
42 questions
QUIZ PPH PASAL 21
Quiz
•
University
42 questions
môn công nghệ
Quiz
•
KG - University
45 questions
Hak Kekayaan Intelektual
Quiz
•
2nd Grade
50 questions
catedra de Colombia
Quiz
•
1st - 5th Grade
49 questions
Quiz #1: Nucleosides, Nucleotides and Nucleic Acids
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Others
12 questions
Presidents' Day
Quiz
•
KG - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
12 questions
CKLA Unit 6 Comprehension Assessment K
Quiz
•
KG
23 questions
CKLA Unit 6 Assessment K
Quiz
•
KG
16 questions
Blends and Digraphs
Quiz
•
KG - 1st Grade
10 questions
Direct and Indirect Characterization
Quiz
•
KG
22 questions
Waves
Quiz
•
KG - University
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...