Checkpoint 5.35.1.
Create a function called
nums_x_to_y
that takes in two integer parameter, x
and y
and uses a for loop to create and return a list with numbers x
to y
. Note: ignore cases when y
is not larger than x
. For example, nums_x_to_y(1,10)
would return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
.