Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- code = input("enter coded text: ")
- distance = int(input("enter value: "))
- plainText = ""
- for ch in code:
- ordvalue = ord(ch)
- ciphervalue = ordvalue - distance
- if ciphervalue < ord('a'):
- ciphervalue = ord('z') -
- (distance - (ord('a')-ordvalue - 1))
- plainText += chr(ciphervalue)
- print(plainText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement