Caesar Cipher
Shift every letter of s forward by k places in the alphabet, wrapping from z back to a (and Z to A). Keep upper and lower case, and leave characters that are not letters unchanged.
If k is negative, shift backward instead.
Example 1
s "abc xyz"
k 3
returns "def abc"
def abc.
Example 2
s "Hi!"
k -1
returns "Gh!"
Backward by one: Gh!.
Constraints
0 <= len(s) <= 100-100 <= k <= 100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.