def create_dictionary_of_words(full_string):
    """Creates a dictionary of words and number of their occurrences in a string"""
    list_of_words = full_string.split()  # Creating list of all words.
    list_of_words = list(dict.fromkeys(list_of_words))  # Deleting duplicates from the list  of  all words.

    # Creating a dictionary of words and the number of  their occurrences.
    dictionary_of_words = dict()
    for word in list_of_words:
        word = ' ' + word + ' '
        number_of_occurrences = full_string.count(word)
        dictionary_of_words[word] = number_of_occurrences
    return dictionary_of_words