
Luyện tập Câu lệnh for

Quiz
•
Information Technology (IT)
•
10th Grade
•
Medium
TRANG LINH
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Bạn muốn in dòng chữ “Chúc mừng sinh nhật!” 10 lần. Câu lệnh for phù hợp là?
for i in range(1, 10): print("Chúc mừng sinh nhật!")
for i in range(10): print("Chúc mừng sinh nhật!")
for i in 10:
print("Chúc mừng sinh nhật!")
for print("Chúc mừng sinh nhật!") in range(10):
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Để in bảng cửu chương 9, từ 9x1 đến 9x10, bạn viết:
for i in range(1, 11): print(i * 9)
for i in range(1, 10): print(9 * i)
for i in range(11): print(9 x i)
for i = 1 to 10:
print(9 * i)
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Trong hoạt động thể dục, nếu bạn nhảy dây 20 cái, ta dùng range thế nào?
range(1, 20)
range(1, 21)
range(20, 1)
range(0, 20, 2)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Câu lệnh nào sau đây in ra các số chẵn từ 2 đến 10?
for i in range(2, 11, 2): print(i)
for i in range(2, 10): print(i)
for i in range(0, 10): print(i + 2)
for i in range(2, 11): if i % 2 == 0: print(i)
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Khi dọn vệ sinh lớp học, bạn lau 4 cửa sổ. Lệnh for phù hợp:
for i in range(1, 4): print("Lau cửa sổ", i)
for i in range(4): print("Lau cửa sổ", i+1)
for i in range(5): print("Lau cửa sổ", i)
for i in range(1, 5): print("Lau cửa sổ")
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Đoạn lệnh sau có lỗi gì?
for i in range(1, 6)
print(i)
Thiếu dấu ":"
Sai indent
Dư khoảng trắng
Không lỗi
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Dùng for để in từ “Hello” 5 lần:
for i in range(0, 5): print("Hello")
for i in range(5): print(i)
for i in print("Hello")
print("Hello") * 5
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Final Evaluation on Spreadsheet

Quiz
•
10th Grade
20 questions
Программирование на Python

Quiz
•
10th Grade
20 questions
Analisis Data dengan Python

Quiz
•
10th Grade
15 questions
Bài 19: Câu lệnh rẽ nhánh IF

Quiz
•
10th Grade
20 questions
KELAS 7 BAB 6 ANALISIS DATA C. Pengolahan Data Dasar

Quiz
•
7th Grade - University
15 questions
Quiz de Robótica com Arduino e mBlock

Quiz
•
10th Grade
10 questions
Understanding Data and Encoding

Quiz
•
6th Grade - University
20 questions
Câu hỏi về cấu trúc lặp trong Python

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 Information Technology (IT)
10 questions
Video Games

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

Interactive video
•
6th - 10th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University