import math


def calculate_entropy(character_set, length):
    """
    Calculates the bits of entropy used to generate the password.
    """
    return round(math.log2(len(character_set)**length), 1)