input: Write a python function to convert a sentence to Pig Latin.
  assert convert_to_pig_latin("hello world") == "ellohay orldway"
  assert convert_to_pig_latin("this is a test") == "histay siay aay esttay"
  assert convert_to_pig_latin("I love programming") == "Iay ovelay rogrammingpay"
output: def convert_to_pig_latin(sentence):
      def convert_word(word):
          if word[0] in 'aeiouAEIOU':
              return word + 'ay'
          else:
              return word[1:] + word[0] + 'ay'
      
      return ' '.join(convert_word(word) for word in sentence.split())