Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 710 Bytes

File metadata and controls

25 lines (16 loc) · 710 Bytes

Caesar Cipher

Instructions

Given a string and integer shift implement a function which shifts each character in that string by shift amount (cesar cipher) eg. if shift is 1 then a becomes b, c becomesd, z became a etc. Allowed input is string containing only lowercase characters from alphabet abcdefghijklmnopqrstuvwxyz.

Challenge | Solution

Examples

caesar_cipher("abc", 1) # bcd

caesar_cipher("abc", 3) # def

caesar_cipher("xyz", 1) # yza

Hints

Hint 1 Use ASCI character table