The function takes a string input and appends "Hello, world!" or "Goodbye, world!" to the end of the string, depending on the input.
