def get_similarity_score(dict1, dict2, dissimilarity = False):
    """
    The keys of dict1 and dict2 are all lowercase,
    you will NOT need to worry about case sensitivity.

    Args:
        dict1: frequency dictionary of words or n-grams for one text
        dict2: frequency dictionary of words or n-grams for another text
        dissimilarity: Boolean, optional parameter. Default to False.
          If this is True, return the dissimilarity score, 100*(DIFF/ALL), instead.
    Returns:
        int, a percentage between 0 and 100, inclusive
        representing how similar the texts are to each other

        The difference in text frequencies = DIFF sums words
        from these three scenarios:
        * If a word or n-gram occurs in dict1 and dict2 then
          get the difference in frequencies
        * If a word or n-gram occurs only in dict1 then take the
          frequency from dict1
        * If a word or n-gram occurs only in dict2 then take the
          frequency from dict2
         The total frequencies = ALL is calculated by summing
         all frequencies in both dict1 and dict2.
        Return 100*(1-(DIFF/ALL)) rounded to the nearest whole number if dissimilarity
          is False, otherwise returns 100*(DIFF/ALL)
    """
    ALL = 0
    DIFF = 0
    for x in dict1.keys():
        if x in dict2.keys():
            DIFF += abs(dict1[x]-dict2[x])
        else:
            DIFF += dict1[x]
    for t in dict2.keys():
        if t not in dict1.keys():
            DIFF += dict2[t]
    for g in dict1.values():
        ALL += g
    for w in dict2.values():
        ALL += w
    if dissimilarity == False:
        return int(round(100*(1 - (DIFF/ALL))))
    else:
        return int(round(100*(DIFF/ALL)))