Practice Week - 03 (11.1.1) - More about range() - Data Structures and Algorithms in Python
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Week - 03

Practice - Week - 03

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

What does range(5) produce?

💡 Hint: Remember, it starts from 0 by default.

Question 2 Easy

If I write range(1, 5), what numbers are generated?

💡 Hint: Consider the upper limit when analyzing this.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What is the output of list(range(3, 8))?

[3
4
5
6
7]
[3
4
5
6
7
8]
[3
4
5
6]

💡 Hint: Remember the end is exclusive in the range.

Question 2

In Python 3, does range() produce a list?

True
False

💡 Hint: Think of the implications for how we handle outputs of `range()`.

1 more question available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Using the range() function create a list of numbers from 1 to 50 that are divisible by both 3 and 5.

💡 Hint: Think about selecting appropriate numbers while looping.

Challenge 2 Hard

Create a program that prints every third number between 1 and 30 in reverse order using range().

💡 Hint: Determine the appropriate start and step.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.