Practice - Examples and specific behavior
Practice Questions
Test your understanding with targeted questions
What is the output of range(3)?
💡 Hint: Think about the start point when only one argument is used.
If range(1, 5) is used, what numbers will be generated?
💡 Hint: Remember, the stop value is exclusive.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does range(10, 0, -2) output?
💡 Hint: Consider how you would decrement within the range.
True or False: range(5, 10) includes the number 10.
💡 Hint: Remember, the upper limit is not included in the output.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Create a function that takes two parameters, start and end, and uses range() to print all odd numbers between start and end.
💡 Hint: Think through how odd numbers can be generated using a step.
Use range() to create a sequence starting from 100 down to 0 in steps of 10, and store it in a list.
💡 Hint: How would you define your starting and stopping points for a countdown?
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.