input: Write a python function to convert a sentence to Pig Latin.
  assert translate_sentence('Hello world') == 'elloHay orldway'
  assert translate_sentence('Python is fun') == 'ythonPay isay unfay'
  assert translate_sentence('I love programming') == 'Iay ovelay rogrammingpay'
output: def translate_sentence(sentence):
      def translate_word(word):
          vowels = 'aeiouAEIOU'
          if word[0] in vowels:
              return word + 'ay'
          else:
              return word[1:] + word[0] + 'ay'
  
      return ' '.join(translate_word(word) for word in sentence.split())