Challenge: Caesar's Cipher | Sololearn: Learn to code for FREE!


Challenge: Caesar's Cipher

 Caesar cipher is one of the earliest known and simplest ciphers. It is a type of substitution cipher in which each letter in the plaintext is 'shifted' a certain number of places down the alphabet. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. INPUT first line of input is N denoting the number of shifts to be done second line of input is the text to be ciphered OUTPUT encoded message CONSTRAINTS 0 < N < 2^32 Sample 1 uvwxyz vwxyza 5 defend ijkjsi

12/8/2017 4:39:04 PM

Reniel Galerio

7 Answers

New Answer


Hey, this is the first Python code, it's one-liner. And accepts any value of N



If you only want to shift letters in range A-Z a-z, then mine is not for you 😢, anyway take a look 😀.


here's my code


is it good?

+3 This was written in c, then modified to accept input in the c++ code playground. It will also accept the shift as first input or from the command line (not both) if built using a compiler. Also first command line argument is a d then it will decide, ie the shift is in the other direction.

+2 Works good :O Greetings :D