input: Write a function to replace a given word in a sentence with another word and return the new sentence. The function should take three parameters: the sentence to be modified, the old word to be replaced, and the new word to replace the old word.
  assert replace_word("I love walking on the beach", "walking", "swimming")=="I love swimming on the beach"
  assert replace_word("The quick brown fox", "brown", "black")=="The quick black fox"
  assert replace_word("She enjoys reading books", "reading", "writing")=="She enjoys writing books"
  assert replace_word("He is running fast", "running", "walking")=="He is walking fast"
  assert replace_word("They are playing in the park", "playing", "jumping")=="They are jumping in the park"
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)