
I am so happy the first post about sharing my Python scripts got such a great response. Your interest really motivated me! As promised, I am continuing the series, and today I am bringing you two new projects that I used to teach in the classroom.
These projects are once again designed to be simple and fun for anyone just starting with Python. They are ideal for helping students and self-learners take the next step in their coding journey.
1. ROT13 Encryptor
This simple Python script rot13-cipher.py is a great example of string manipulation and file handling for beginners. The program reads text from one file, applies the classic ROT13 cipher to encrypt it, and then saves the encrypted text to a new file.
The script demonstrates how to:
- Read and write to files.
- Iterate over characters in a string.
- Handle both uppercase and lowercase letters.
- The modulo operator ensures the index wraps around from 'z' back to 'a' if needed.
This project is a fun way to understand how ciphers work and is perfect for a first-time foray into more advanced text-based programs. You can use an ROT13 online tool to easily decrypt the text and see the results for yourself!
On Picture 1, you can see the content of the rot13-unencrypted.txt file, which holds the original text ready to be encrypted. The text is easy to read and serves as the input for our program.

Picture 1 - Plain text for Encryption in file rot13-unencrypted.txt
On Picture 2, you can see the program's output saved in the rot13-encrypted.txt file. We can see that the original text has been encrypted using the ROT13 cipher, making it unreadable to a casual user.

Picture 2 - ROT13 Encrypted text in file rot13-encrypted.txt
2. Mental Math Quizzer
Our second project math_quiz.py is an interactive mental math game that's perfect for honing your skills. This Python script creates arithmetic problems that get progressively harder as you play, making it a great way to challenge yourself and track your progress.
- The script demonstrates how to:
- Accept and validate user input.
- Dynamically update variables to control game state (e.g., score, time limit).
- Use loops to run the game indefinitely until a condition is met.
- Implement a simple, scalable algorithm to change the range of numbers with each new level.
This project is a fantastic example of using basic programming concepts to build a fun, engaging, and genuinely useful application that you can customize and improve.
On Picture 3, you can see a sample gameplay session. It clearly shows the progression through levels, different types of feedback (correct, wrong input, time's up), and the final game-over summary with points earned.

Picture 3 -Math Quiz Game
End.