I think you want something like this:
def while_loop(start, end):
numbers = 
while start < end:
start += 1
make_numbers = while_loop(5, 20)
Step by step:
You define a function named
while_loop with two parameters
You define a empty list called numbers inside the function.
Yo define a while loop inside the function with a start- and a endpoint.
Increment the start by one.
Append the actual number to the list.
return the list
define a variable
make_numbers with a function call of
while_loop with a startpoint of 5 and a endpoint of 20.
print the variable
[6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
Hope that helps.