Cú pháp đúng để viết vòng lặp for trong Python là gì?
TRẮC NGHIỆM VUI PYTHON

Quiz
•
Information Technology (IT)
•
10th Grade
•
Hard
Dung Tin
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
for (i = 0; i < 5; i++)
for i in range(5):
for i to 5:
for each i in range(5)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì?
for i in range(3):
print(i, end=" ")
1 2 3
0 1 2
0 1 2 3
1 2 3 4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Vòng lặp while nào sau đây sẽ chạy vô hạn?
while True:
print("Hello")
while 0:
print("Hi")
while False:
print("Hey")
while 1 == 0:
print("Python")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn code sau thực hiện chức năng gì?
i = 0
while i < 5:
print(i)
i += 1
In các số từ 1 đến 5
In các số từ 0 đến 4
In số 5 lần số 0
Vòng lặp vô hạn
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để thêm phần tử vào cuối danh sách my_list, ta dùng lệnh nào?
my_list.add(5)
my_list.push(5)
my_list.append(5)
my_list.insert_last(5)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để nối hai chuỗi s1 = "Hello" và s2 = "World" thành "HelloWorld", ta viết:
s1 + s2
s1 . s2
add(s1, s2)
join(s1, s2)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn code sau là ví dụ của loại hàm nào?
def greet():
print("Hello, world!")
Hàm trả về giá trị
Hàm không trả về giá trị
Hàm có tham số
Lỗi
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Bài 29

Quiz
•
10th Grade - University
10 questions
Tin 9 Bài 8. Hàm SUMIF

Quiz
•
9th Grade - University
15 questions
Quiz Pemrograman Arduino

Quiz
•
10th Grade - University
11 questions
Python (basics)

Quiz
•
1st Grade - University
10 questions
مراجعة في الجملة التكرارية for

Quiz
•
10th Grade
10 questions
TH10 CĐ5-BH23 Tiết 1

Quiz
•
10th Grade
10 questions
Pseudocode Revision Quiz

Quiz
•
10th Grade
10 questions
Python bài 10

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade