21.2.1 - What is the FOR Loop?
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
Write a FOR loop to print numbers from 1 to 3.
💡 Hint: Use range to set starting and stopping values.
Create a FOR loop to print each letter in the word 'cat'.
💡 Hint: Loop through the characters of a string.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the purpose of a FOR loop?
💡 Hint: Think about the use of loops in programming.
True or False: The range function is used to define the number of iterations in a FOR loop.
💡 Hint: Recall how iterations work in loops.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Create a FOR loop that returns the squares of numbers from 1 to 10.
💡 Hint: Remember to use the power operator to calculate squares.
Develop a FOR loop that counts how many vowels are in a given string.
💡 Hint: Initialize a count variable and check each letter against the vowels.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.