Guest User

Untitled

a guest
Dec 10th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. posun = int(raw_input("Zadaj posun: "))
  2. text = raw_input("Zadaj text: ")
  3. E = []
  4. D = []
  5. for i in text:
  6.     cislo = ord(i) - 65  
  7.     E.append(chr(((cislo + 3) % 26) + 65))
  8.     D.append(chr(((cislo+(26-posun)) % 26) + 65))
  9. print "Encrypt: " + "".join(E)
  10. print "Decrypt: " + "".join(D)
Add Comment
Please, Sign In to add comment