input: Write a python function to find the index of a given word in a sentence.
  assert index_of_word("Python is a programming language.", "language") == 4
  assert index_of_word("Python is a programming language.", "Python") == 0
  assert index_of_word("Python is a programming language.", "Java") == -1
output: def index_of_word(sentence, word):
      words = sentence.split()
      try:
          return words.index(word)
      except ValueError:
          return -1