input: Write a python function to calculate word frequencies in a sentence.
  assert word_frequency("This is a test string to check the frequency of words in the string") == {'This': 1, 'is': 1, 'a': 1, 'test': 1, 'string': 2, 'to': 1, 'check': 1, 'the': 2, 'frequency': 1, 'of': 1, 'words': 1, 'in': 1}
  assert word_frequency("hello world hello") == {'hello': 2, 'world': 1}
  assert word_frequency("Python is great and Python is fun") == {'Python': 2, 'is': 2, 'great': 1, 'and': 1, 'fun': 1}
output: def word_frequency(sentence):
      words = sentence.split()
      frequency = {}
      for word in words:
          if word in frequency:
              frequency[word] += 1
          else:
              frequency[word] = 1
      return frequency