Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβperfect for learners of all ages.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
What is the output of range(3)
?
π‘ Hint: Remember, it starts at 0.
Question 2
Easy
What does range(5, 10)
give you?
π‘ Hint: It's from 5 to just before 10.
Practice 4 more questions and get performance evaluation
Engage in quick quizzes to reinforce what you've learned and check your comprehension.
Question 1
What is the output of range(0, 5, 1)
?
π‘ Hint: Think about starting and stopping rules.
Question 2
True or False: In Python 3, range
produces a list.
π‘ Hint: Refer to the distinction made about Python versions.
Solve 1 more question and get performance evaluation
Push your limits with challenges.
Question 1
Create a function that uses range()
to print all odd numbers between 1 and 50.
π‘ Hint: Start from 1, use a step of 2.
Question 2
Use range()
to generate a list of squares of the first 10 natural numbers.
π‘ Hint: You are collecting squares; remember to use the loop!
Challenge and get performance evaluation