Write a method def caesar_cipher(string, number)
that takes a string and a number as an argument and returns a string based on the following requirements:
-
Shift each letter in the string
number
spots down the alphabet. For example, runningcaesar_cipher("a", 2)
would return"c"
.caesar_cipher("z", 2)
would return"b"
.caesar_cipher("Caesar", 2)
would return"Ecguct"
. -
Punctuation, capitalization and spacing should be unchanged. Numbers also remain unchanged.
Solution
- WIP