Question: using python/IDLE to answer the following question: Q.1 Write a function called range_roller[) that takes in two parameters N and K, both as integers. The

using python/IDLE to answer the following question:using python/IDLE to answer the following question: Q.1 Write a function called

Q.1 Write a function called range_roller[) that takes in two parameters N and K, both as integers. The function should do the following using the range[ ) function: - Return a list of numbers from N to 2N+1 (maximum if possible) with step size =3, if and only if K=0 - Return a list of numbers from N to 0 iminimum if possiblej with step size-2, if and only if K1 - Return 1 if K is neither 0 nor 1 Two examples are shown below: Input: (9,0) Output [9, 12, 15, 18] Input: (11,1) Output: [11,9,7,5,3,1] Q.2 Write a function called while it () that takes in no parameters and returns a list of the series, 105,98,91,....7. Constraint: You have to use a while loop to implement this Input: (984) Output: 21 Input \{21\} Qutput: 3 and the smallest number in the form of a list which is supposed to be arranged in descending order. Two examples are shown below: Input: (100,3,1) Output [100,1] Input: (3,4,4) Output: [4,3]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!