Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
Write a FOR loop to print numbers from 1 to 3.
Use range to set starting and stopping values.
Create a FOR loop to print each letter in the word 'cat'.
Loop through the characters of a string.
What is the purpose of a FOR loop?
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.
Recall how iterations work in loops.
Create a FOR loop that returns the squares of numbers from 1 to 10.
Remember to use the power operator to calculate squares.
Develop a FOR loop that counts how many vowels are in a given string.
Initialize a count variable and check each letter against the vowels.
5 more questions in this section. Enroll free to practise them all.
Enroll free