Strings · stretch
Caesar cipher
Write caesar(text, shift) moving every lowercase letter shift places along the alphabet, wrapping from z back to a. Everything else stays as it is. caesar("abz", 1) is "bca".
ord("a") is 97 and chr(97) is "a": letters are numbers underneath.
- right answers
- arguments left as they should be
Run adds print(caesar("hello, world", 3)) after your code, to try it.
Stuck on the idea rather than the code? The String methods lesson walks through it.