The function takes a string input and returns a modified version of the input string with the words "world" and "great" replaced with exclamation marks.

