def calories_per_item(hundr, weight, number_cookies, output_type):
    """
    >>> calories_per_item(430, 0.3, 20, 0)
    'One item has 64.5 kcal.'
    >>> calories_per_item(430, 0.3, 20, 1)
    'One item has 64.5 Calories.'
    >>> calories_per_item(1, 1000, 10, 1)
    'One item has 1000.0 Calories.'
    >>> calories_per_item(1, 1000, 10, 0)
    'One item has 1000.0 kcal.'
    >>> calories_per_item(0, 1000, 10, 0)
    'One item has 0.0 kcal.'
    """
    kcal_per_item = hundr * 10 # convert kcal per 100g to kcal per kg
    unit = 'kcal'

    if output_type == 1: # change output unit based on input
        unit = 'Calories'
    
    return 'One item has ' + str((kcal_per_item * weight) / number_cookies) + ' ' + unit + '.'