input: 
  Write a function to replace a given word in a sentence with another word. The function should take three parameters: the sentence, the word to be replaced, and the new word. It should return the modified sentence. If the word to be replaced does not exist in the sentence, return the original sentence.
  assert replace_word("I love walking on the beach", "walking", "swimming") == "I love swimming on the beach"
  assert replace_word("The cat is on the mat", "dog", "cat") == "The cat is on the mat"
  assert replace_word("The quick brown fox jumps over the lazy dog", "fox", "dog") == "The quick brown dog jumps over the lazy dog"
  assert replace_word("", "any", "word") == ""
  
output:     if word_to_replace in sentence:
          return sentence.replace(word_to_replace, new_word)
      else:
          return sentence