def num_to_char(num):
    """ Function to map a number to a character."""
    switcher = {
         0: '0',  1: '1',  2: '2',  3: '3',  4: '4',  5: '5',  6: '6',  7: '7',
         8: '8',  9: '9', 10: 'a', 11: 'b', 12: 'c', 13: 'd', 14: 'e', 15: 'f'
    }
    return switcher.get(num, ' ')