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 does the range(5)
function return in Python 3?
π‘ Hint: Think about the starting point and the absence of a stopping point.
Question 2
Easy
How would you create a sequence counting down from 10 to 1?
π‘ Hint: What must you include for the sequence to decrease?
Practice 4 more questions and get performance evaluation
Engage in quick quizzes to reinforce what you've learned and check your comprehension.
Question 1
In Python 2, what does range(5)
return?
π‘ Hint: Think about the difference in output between the versions.
Question 2
True or False: range(1, 10, 2)
generates 1, 3, 5, 7, 9.
π‘ Hint: What does the step argument control?
Solve 1 more question and get performance evaluation
Push your limits with challenges.
Question 1
Write a function that accepts parameters for start, stop, and step to create a range in Python 3. Then demonstrate how this works with a real example.
π‘ Hint: Focus on how to use the range function to output your desired sequence.
Question 2
Create a loop that counts down from 10 to 1 and print each number using range
. What should the output be?
π‘ Hint: Use the negative step to encourage the countdown creation.
Challenge and get performance evaluation