def calculate_similarity(dict1,dict2):
    """
    Parameters
    ----------
    dict1: freq dict for text1
    dict2: freq dict for text2
    Returns
    -------
    float between [0,1] for similarity 
    """
    diff = 0
    total = 0
    # Uses 2 loops. This one goes through all of dictionary 1
    for word in dict1.keys():
        # If the word is in both dictionaries
        if word in dict2.keys():
            diff += abs(dict1[word]-dict2[word]) #Get the diff in frequency in + val
        #Otherwise, just add the count since the word isnt in dict2
        else:
            diff += dict1[word]
    # 2nd loop dictionary 
    for word in dict2.keys():
        if word not in dict1.keys():
            diff += dict2[word] #Add the frequency
    
    # Calculate total: total number of words in both dictionaries 
    total = sum(dict1.values()) + sum(dict2.values())
    difference = diff/total          
    similar = 1.0 - difference
    # Return a number with 2 decimal places 
    return round(similar,2)