Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("THIS IS CELESTE CIPHER PROJECT")
- print("satu: encrypt a message etselec way...")
- print("dua: decrypt a message from etselec way...")
- answer = input()
- alpha = [
- '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']
- while answer != "satu" and answer != "dua":
- answer = input("HEY!! are you malaysian? Yes? malay you don't know meh? No? sry but satu means ONE and dua means TWO")
- if answer == "satu":
- print("Alright! Flipy Flapa Time!")
- text = input("Please ENTER your secret sentence you want to encrypt (in all lower letters):")
- encode = []
- for i in text:
- if i in alpha:
- encode.append(str(alpha.index(i)+2))
- print("/".join(encode))
- elif answer == "dua":
- print("Alright! Flapa Flipy Time!")
- num = input("Please ENTER your secret sentence you want to decrypt (in all lower letters):").split("/")
- decode = ""
- for i in num:
- decode = decode + alpha[int(i)-2]
- print(decode)
Advertisement
Add Comment
Please, Sign In to add comment