input: Write a python function to convert a given text to Pig Latin.
  assert textToPigLatin("hello world") == "ellohay orldway"
  assert textToPigLatin("apple pie") == "appleay iepay"
  assert textToPigLatin("banana split") == "ananabay plitsay"
  assert textToPigLatin("I am a student") == "Iay maay aay tudentay"
  assert textToPigLatin("this is a test") == "histay siay aay esttay"
output: def textToPigLatin(text):
      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 text.split())