24.What is the use of range function? Write with example.
Answers
Answered by
2
Answer:
Range function is used to fine range of any variable or value...
Answered by
0
The range function is used to define the range for the loop.
Explanation:
- he range function is used in the python language. Generally, it is used with the for loop to determine the starting value, ending value and the processor. The example is listed below:
- for x in range(1,5,+1): #The 1 is the initial value, 5 is the ending value and the "+1" is a processor.
- print(x)
- If there is no operation or initial value defined in the range function, then the range function takes the value by default.
Learn More:
- Python: https://brainly.in/question/14689905
Similar questions