Dark theme

Answer


So, here's one answer: encrypt.py.

Note that later in the course you'll see how to a) take in a command line prompt to change how software runs, and b) learn how to direct files into the program and out of it; this will allow you to encrypt and decrypt whole files.

There are lots of encryption algorithms out there, and this is a relatively simple one. Another simple(ish) one is ROT13, which you could have a go at: rather than using the ord number you'd need an alphabet list and to identify the position of the letter within that, then using (position + 13) % 26 or similar to get the encrypted character. The only thing you have to watch out for is upper case letters.