We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Caesar Cipher
- Discussions
Caesar Cipher
Caesar Cipher
Sort by
recency
|
584 Discussions
|
Please Login in order to post a comment
js single line code solution:
did it using ascii value in Java public static String caesarCipher(String s, int k) { String s1 = ""; int k1;
}
def shiftLetter(ch, shift): sub_const = ord('z') - ord('a') + 1 shift = shift % 26 numval = ord(ch)+shift
upper = ch.isupper()
def caesarCipher(s, k): # Write your code here new_s = str() for c in s: if c.isalpha(): ch = shiftLetter(c, k) else: #non alpha chars ch = c new_s += ch return new_s