Your question is Implement Python Caesar Cipher. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Canonical tooling may need to transform short diagnostic or configuration strings before transmitting them through an Ubuntu service. Implement a Caesar cipher that shifts every ASCII letter by a specified amount while leaving digits, spaces, punctuation, and other characters unchanged.
Implement caesar_encrypt(text, shift), where text is a string and shift is an integer. Lowercase letters must remain lowercase, uppercase letters must remain uppercase, and shifts must wrap around the alphabet. Positive shifts encrypt forward, while negative shifts move backward. Return the encrypted string. Do not modify the input string.
The function should support shifts larger than 26 by treating them modulo 26. For this problem, only characters in A-Z and a-z are shifted. All other characters are copied exactly.
A-Z and a-z are transformeddef caesar_encrypt(text, shift):