def probability_with_pseudocount(text, motif_profile):
    """Calculate the probability of a string (i.e. text) given a motif profile matrix. With pseudocount.

    Args:
        text (string): a text string probability given the profile matrix.
        motif_profile (dict): represent the probability of occurence of each nucleotide for each column.

    Returns:
        Float, the probability of text calculated from profile.

    """
    probability = 1
    for i in range(len(text)):
        probability *= motif_profile[text[i]][i]
    return probability