From Classroom to Community 1 - Sort and Game

I am a former high school teacher with a passion for networking and programming, especially Python. For years, I helped students take their very first steps into the world of coding - from printing “Hello, world!” to understanding loops, conditionals, and simple algorithms.

Over time, I built a collection of beginner-friendly Python scripts and mini-projects that I wrote for my lessons. These were designed to be clear, easy to understand, and engaging for students just starting out.

Now that I am no longer in the classroom, I would like to share these scripts with a wider audience. Whether you are a student, a self-learner, or an educator looking for simple examples to use in your own lessons - I hope you will find something useful here.

All the scripts are available on my GitHub repository. You’ll find simple Python exercises with comments and explanations. There are also visual examples, like sorting algorithms built with Tkinter. And finally, I have  included useful teaching patterns with beginner-friendly code structure.

Feel free to explore, use, or adapt the code for your own projects or classes. If you have feedback or suggestions, I would love to hear from you. Let’s keep learning and sharing together. Happy coding!

1. Bubble Sort with Visualization 

This Python script visually demonstrates the Bubble Sort algorithm using Tkinter. It helps beginners understand how Bubble Sort works in action.. The script generates a list of unique random digits from 0 to 9. Each number is displayed horizontally on a canvas.

Picture 1 - Sorted list with Bubble sort algorithm

During sorting, the script highlights how the largest digits "bubble" to the right. The list is sorted in ascending order step by step. Each comparison and swap is shown with a delay for clarity. The visualization updates after every sorting step.

2. Rock, Paper, Scissors Against Computer

This Python script is a simple Rock, Paper, Scissors game where the user plays against the computer. The game is beginner-friendly and runs in the terminal. The player chooses between rock (r), paper (p), or scissors (s). The computer randomly picks one of the three options each round.

Picture 2 - Rock, Paper, Scissors

The game runs for a user-defined number of rounds. After each round, the script shows who won and updates the score. It handles invalid inputs and displays friendly messages.

Results are determined using classic game rules (rock beats scissors, etc.). At the end, the script announces the overall winner. Emojis add a fun touch to the final result.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.