input: Write a function to print the top 5 most frequent words in a given sentence. The function should take a string as an input and return a list of tuples with the word and its frequency, sorted by frequency from highest to lowest.
  assert frequent_words("Python is an interpreted, high-level, general-purpose programming language.")==[('Python', 1), ('is', 1), ('an', 1), ('interpreted,', 1), ('high-level,', 1)]
output: def frequent_words(sentence):
      words = sentence.split()
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      sorted_words = sorted(word_count.items(), key=lambda x: x[1], reverse=True)
      return sorted_words[:5]