Define a scheme function range that takes a pair x y of natu
Define a scheme function range that takes a pair (x, y) of natural numbers as input and returns a list of all integers between them, inclusive. I have a function that can make a list given two numbers, I just can\'t figure out how to do it with a pair
Solution
The following code gives you the required solution in Python
# your code goes here
def Fun_range(x,y):
l = list()
for i in range(x,y+1):
l.append(i)
return l
l = Fun_range(2,9)
print l
Output:
[2, 3, 4, 5, 6, 7, 8, 9]
Link of code:
http://ideone.com/2GLpph
Hope it helps, do give your response.
