def recipe_og(recipe):
    """Returns a recipe's Original Gravity"""
    if 'fermentables' not in recipe:
        return '0.000'
    points = 0
    grain_points = 0
    for fermentable in recipe['fermentables']:
        if fermentable['type'] == 'Grain':
            grain_points += float(fermentable['amount']) * float(fermentable
                ['ppg'])
        else:
            points += float(fermentable['amount']) * float(fermentable['ppg'])
    points += grain_points * float(recipe['efficiency']) / 100
    return '{:.3f}'.format(round(1 + points / (1000 * float(recipe['volume'
        ])), 3))
