Bạn đang xem thử công khai
Đăng nhập để lưu tiến độ, làm bài tập, thảo luận và nhận phản hồi.
After this unit you will: choose the right kind of loop and predict exactly how many times it runs.
range(start, end, step) stops just before end: range(2, 6) gives 2, 3, 4, 5.break exits the loop; continue skips the current iteration.else after a loop runs only if the loop was not ended by break.for when the number of iterations is known in advance; use while to repeat until a condition becomes false.