Advertisement
trodland

Rot3 Crypto

Oct 12th, 2020
1,973
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. kode = "khl sc ghj"
  2.  
  3. bokstaver = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','æ','ø','å']
  4.  
  5. for bokstav in kode:
  6.     if bokstav in bokstaver:
  7.         plass = bokstaver.index(bokstav)
  8.    
  9.         hemmeligplass = plass - 3
  10.         if hemmeligplass < 0:
  11.             hemmeligplass = 27 - hemmeligplass #hvorfor 27????
  12.         if hemmeligplass > 28:
  13.             hemmeligplass = hemmeligplass - 29
  14.        
  15.         print(bokstaver[hemmeligplass],end='')
  16.     else:
  17.         print(" ",end='')
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement