Last active
September 17, 2017 18:12
-
-
Save uliska/4e62d771afdcb2c451c7a53995918b5a to your computer and use it in GitHub Desktop.
Drehscheiben-Geheimschrift
This file contains 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
#/usr/bin/env python3 | |
in_str = input('Satz in Geheimschrift eingeben: ').upper() | |
for offs in range(1, 26): | |
print('A' + chr(65 + offs) + ': ', end='') | |
for c in in_str: | |
if c == ' ': | |
print(' ', end='') | |
continue | |
c_new = (ord(c) - 65 + offs) % 26 | |
print(chr(c_new + 65), end='') | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ergebnis:
Offenbar ist das Ergebnis:
BEI DER DREHSCHEIBE STEHEN E UND C GEGENUEBER