The function takes an input string and shifts each character in the string by `k` positions in the alphabet.

