def dec_to_hex(decimal_number):
    """
    Accepts a decimal integer.
    Returns a hexadecimal number in a string.
    """
    hex_char = {(10): 'A', (11): 'B', (12): 'C', (13): 'D', (14): 'E', (15):
        'F'}
    hex_number = ''
    while decimal_number > 0:
        hex = decimal_number % 16
        decimal_number = (decimal_number - hex) // 16
        if hex >= 10:
            hex_number = hex_char[hex] + hex_number
            continue
        hex_number = str(hex) + hex_number
    return hex_number
