Question: Define a recursive function disp that takes two arguments: o a number d , and o a list of tuples pairs. Every tuple in this

Define a recursive function disp that takes two arguments:

o a number d , and

o a list of tuples pairs.

Every tuple in this input list consists of a number followed by a character, and you can assume the input list is always in ascending order. For example, a possible input list might be:

The function disp should return the character from the list that corresponds to the smallest number on the list that is greater than the input d , and if d is larger than all the number in the list, disp should return a space character,'.

Test your function:

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 Programming Questions!