What values will be generated for the following range function:(a) range (5,15,3), (b) range (8,2,-1)
Answers
Answered by
1
Answer:
Assuming the language is Python and range object is typecasted to list,
a) values = [5, 8, 11, 14]
b) values = [8, 7, 6, 5, 4, 3]
Explanation:
In Python, the range() function takes three parameters:
- Start (Inclusive)
- End (Exclusive)
- Step
The next number in a range given previous value , start value , step , and end value will be,
where
Similar questions
English,
3 months ago
Math,
3 months ago
Math,
3 months ago
English,
6 months ago
Environmental Sciences,
11 months ago
Math,
11 months ago
Accountancy,
11 months ago