All of these range types are correct except ___.
range(10,20,2)
range(20,40,-1.2)
range(10,20,30).
Answers
Answered by
2
Answer:
range (20,40,-1.2)
Explanation:
hope it helps to u nd don't forget to follow me
Answered by
0
"All these range types are correct except" the range(20,40,-1.2).
We are required to find which range() is incorrect in the following given range functions.
- The range function () returns the sequence of numbers between the given argument.
- The range function () in default starts from 0 to the (n-1) number in the given stop argument.
- In general, the range(start, stop, step) parenthesis includes 3 values as an argument.
- If only one argument is passed then it is supposed to be a stop argument.
- If two argument is passed then it is a start and a stop argument.
- If three argument is passed then is a start, stop, and step argument.
- In range function() all the arguments are supposed to be an integer and it can't be a floating number or decimal number.
Therefore, The range function() arguments should not be a floating number or decimal number.
From the given range functions, range(20,40,-1.2) has a step argument as a floating number or decimal number.
Hence, range(20,40,-1.2) is incorrect.
#SPJ2
Similar questions