Loading...
Caesar Shift Check
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- mid
Problem
Our encryption audit tool needs to detect Caesar cipher patterns. Write a function called can_shift that takes two equal-length strings and returns True if one can be transformed into the other by shifting every character by the same fixed offset in the alphabet, wrapping from z back to a. Return False for different-length strings.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.