"""
Lecture 11 - You Try: make_ordered_list
Returns a list of integers from 0 to n (inclusive).
"""


# Solution 1: using a loop
def make_ordered_list(n):
    """
    - n is a positive int
    - Returns a LIST containing all ints in order from 0 to n
      (inclusive)
    """
    L = []
    for i in range(n + 1):
        L.append(i)
    return L


# Solution 2: using list(range(...))
def make_ordered_list_v2(n):
    """
    - n is a positive int
    - Returns a LIST containing all ints in order from 0 to n
      (inclusive)
    """
    return list(range(n + 1))


# Test calls
L = make_ordered_list(5)
print(L)    # [0, 1, 2, 3, 4, 5]

L2 = make_ordered_list_v2(5)
print(L2)   # [0, 1, 2, 3, 4, 5]
