input: Write a python function to calculate the frequency of words in a sentence.
  assert word_frequency('This is a sample sentence.') == {'This': 1, 'is': 1, 'a': 1, 'sample': 1, 'sentence.': 1}
  assert word_frequency('hello world hello') == {'hello': 2, 'world': 1}
  assert word_frequency('test test test test') == {'test': 4}
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