def ferm_pct(fermentables):
    """Adds a 'pct' to each fermentable in fermentables.

    'pct' represents the total percentage a fermentable makes up of the grist.
    """
    total = 0
    for ferm in fermentables:
        total += float(ferm['amount'])
    for ferm in fermentables:
        ferm['pct'] = 100 * float(ferm['amount']) / total
    return fermentables
