Last active
August 16, 2017 14:06
-
-
Save nozma/437d7afd751ca362fb953b5728bbcd91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| def cipher(S): | |
| result = [] | |
| for i in range(len(S)): | |
| if(S[i].islower()): | |
| result.append(chr(219 - ord(S[i]))) | |
| else: | |
| result.append(S[i]) | |
| return ''.join(result) | |
| S = "abcDe" | |
| print(cipher(S)) | |
| print(cipher(cipher(S))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment