'''Solution to Exercise 2.12:
    
Input:
    y = [y1, ..., yN], a list of positive integer numbers
    
Example: 
    y = [1, 3, 4, 2] or y = [3, 2, 3, 1, 4, 1]
    You can also experiment with random.shuffle from the random library
    
Typical call of programme: 
    from python02_ex12a import bijective
    y = [1, 3, 4, 2]
    print(bijective(y))

'''

def bijective(y):
    z = list(range(1,len(y)+1))  # list with numbers from 1 to len(y)
    s = sorted(y)
    if z == s:
        return 'Bingo - bijective!'
    else:
        return 'Njet - not bijective!'
