function range(3) is equivalent to?
Answers
Answer:
{3}
Explanation:
y=3
is a straight line perpendicular to the y-axis at point
(0,3) ,
which means that the range is a set of one value {3}
Answer:
function range(3) is equivalent to while(n<=3)
Explanation:
Range() Function
Range is a built-in function of Python that counts in the given scope.
The range function can take three arguments that are as follows:
SYNTAX:
range(starting_point, ending_point, increment/decrement)
However, the first and last arguments are optional. Only the middle one is essential to provide. If the starting point is not given it starts default counting from zero to one less than the number specified.
And if the increment/decrement condition is not given then it increments it by one by default.
range(3) means it will count 0,1, and 2
Its equivalent can be while(n<3) so it will count same that is 0,1,2
#SPJ2