Read the question, write Python on the right, then Run or Check.
QuestionHint and solution stay closed until you open them
Read one line and print its ROT13 encoding: shift each letter by 13 places, wrapping within A–Z / a–z.
Non-letters stay unchanged. ROT13 twice returns the original.
Input. One line of text.
Output. The ROT13-encoded line.
Examples
Input
Hello
Output
Uryyb
Input
ABC xyz
Output
NOP klm
Hint
- Use codecs.encode(text, 'rot_13') or shift ord() by 13 with wrap.
- Keep non-letters as-is.
Show correct code
Peek only after you have tried. You can still Check your own version.
import codecs
print(codecs.encode(input(), 'rot_13'))
main.pyPython · Ctrl + Enter runs
ResultIdle
Run to see output. Check grades the tests.