input: Write a function to replace a given string with another string in a sentence. The function should take three parameters: the original sentence, the old word to be replaced, and the new word to replace the old word. Return the modified sentence.
  
  assert replace_word("I love walking on the beach", "walking", "swimming")== "I love swimming on the beach"
  assert replace_word("Python is great", "Python", "Java")== "Java is great"
  assert replace_word("I have a cat", "cat", "dog")== "I have a dog"
  assert replace_word("The sun is shining", "sun", "moon")== "The moon is shining"
  assert replace_word("", "", "")== ""
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)