CBSE Class 12 Computer Science Question 112 of 120

Review of Python Basics — Question 7

Back to all questions
7
Question

Question 7

The range() function is used to specify the number of iterations to be performed in for loop.

Answer

True

Reason — In Python, the range() function is used to specify the number of iterations to be performed in a for loop. It generates a sequence of numbers that can be used to iterate over a block of code a specific number of times. The range() function takes parameters for the start, stop, and step values to define the range of numbers to be generated.