input: Write a python function to convert a given word to Pig Latin.
  assert pig_latin("python") == "ythonpay"
  assert pig_latin("apple") == "appleway"
  assert pig_latin("smile") == "milesay"
output: def pig_latin(word):
      vowels = "aeiou"
      if word[0] in vowels:
          return word + "way"
      else:
          return word[1:] + word[0] + "ay"