How to make a super spy app on python
Have you ever wanted to share private messages with your friends without anyone understanding. Sure, you could make your own code with keys. But it would take a lot of time to encode and decode.
Have you ever wanted to share private messages with your friends without anyone understanding. Sure, you could make your own code with keys. But it would take a lot of time to encode and decode. Here is a fun way of learning programming as well as making a program with which you can encode and decode within a few seconds and if anyone figures it out you can change the key and continue to keep it obscured. It also saves a lot of time figuring out new codes when you can use the same code with a different key
Instructions for use - Copy paste this code onto any python environment and run it and have fun. I use the Jupyter notebook on Anaconda.
The code:
alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
stringToEncrypt= input("please enter a message to encrypt or decrypt")
stringToEncrypt= stringToEncrypt.upper()
shiftAmount=int(input("Please enter a whole number from 1 to 25 to be your key"))
encryptedString=""
for currentCharacter in stringToEncrypt:
position=alphabet.find(currentCharacter)
newPosition=position + shiftAmount
if currentCharacter in alphabet:
encryptedString=encryptedString+alphabet[newPosition]
else:
encryptedString = encryptedString + currentCharacter
print("Yor encrypted message is", encryptedString)
Once you run, you will be prompted to enter any message to encrypt or decrypt.
Type anything you want. click enter. Encode it with a key of up to 25. for instance if you use a key of 7 to encode it, to decode it press -7. Same goes for a key of 11 to encode it, to decode it press -11.to decode just copy paste the encoded message and click the minus key and then the key used to encrypt it. They key to encrypt or decode has to be a number
For starts - Try to decrypt this message - YFSAN QTAJX YT WJFI GTTPX
the key is -5 to decrypt. It says something about me :). My mother and I exchange some notes via this just for fun :). Please try and let me know how you liked it.
I learnt this program from the usborne book - https://usborne.com/us/coding-for-beginners-using-python-9780794539504#details-list.
Happy Programming and sharing secret messages …