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 that prints numbers from 1 to 5.
Use range with the starting number.
Create a while loop that outputs numbers from 0 to 3.
Set i to start at 0 and check the condition.
What is the correct syntax for a for loop in Python?
Remember the range function.
True or False: A while loop continues indefinitely if the condition never evaluates to false.
Think about continuous conditions.
Create a program using a for loop that finds the factorial of a number.
Think about multiplying a sequence of numbers.
Write a while loop that asks for user input until the word 'quit' is entered, then print all inputs.
Keep a list to store inputs.
5 more questions in this section. Enroll free to practise them all.
Enroll free