Hayden's Hangman
Welcome to Hangman!
Would you like to play with Help Mode?
(Type '!' during the game to reveal a letter for 3 guesses)About this Game
20 Apr 2026
Reflection: Completing My First Game in Python
In Lecture 9 of my current course, Intro to Computer Science and Programming with Python, I completed a problem set that felt like a real turning point. These problem sets are not small exercises. They are major assignments meant to test everything we have learned up to that point. The earlier one was more basic, but this was the first assignment that really felt like: now you have the core tools of programming. You know loops, variables, functions, and logic. Now build something with them.
The challenge was to write a Hangman game from scratch.
Hangman is a simple game when you think about it as a person. One person picks a word, the other guesses letters, and there are only so many wrong guesses before the game ends. Most kids learn some version of it early. But translating that into computation is very different. It is one thing to understand the game intuitively. It is another thing entirely to build the rules, the flow, the conditions, and the feedback in code so that the computer can run it correctly every time.
Using the structure and requirements from the problem set, I wrote the helper functions and the main game logic myself. I had to think through each step carefully: how to represent the hidden word, how to handle guessed letters, how to track remaining tries, how to decide when the game was won or lost, and how to make the whole thing run smoothly from start to finish. There was also an added help-mode feature where typing an exclamation point would reveal one of the letters, which required even more logic and coordination with the rest of the game.
It took several hours of debugging and trial and error. At different points, parts of the word would not display correctly, the logic would not update the game state properly, or the wrong things would happen when guesses were entered. I had to keep asking: what is supposed to happen here, what is actually happening, and why are those different? For someone who had never coded a game before, that process was both difficult and satisfying.
What made it especially meaningful was that I did not rely on AI to write the code for me. I did not copy and paste a generated solution. I worked from what I had learned in the class and built it myself. That was a big deal to me, because just a month earlier I often felt like I did not even know how to begin. It was like being asked to speak in a foreign language when I barely knew the vocabulary. I did not just lack the answer. I lacked the ability to even form the sentence. This time was different. I knew enough syntax, structure, and logic to actually work through the problem.
After I finished the Python version, I wanted to take it further. I was proud enough of it that I wanted people to be able to play it on my website, where I already have a games section. That introduced a new challenge: Python handles the logic well, but it is not naturally meant for direct browser display. So I researched what would be required and moved toward a web version.
At that point, I used Gemini to help translate much of the logic into JavaScript and provide the HTML and CSS structure, but I did not want to just paste the result into my site and call it done. Instead, I challenged myself to rewrite the code into a single HTML, CSS, and JavaScript file that I could understand and use. That ended up taking several more hours across a few days.
That second phase was eye-opening in a different way. I am already comfortable with HTML, somewhat familiar with CSS, but still weak in JavaScript. So rebuilding the project for the web forced me to confront JavaScript directly. I had to go line by line asking what the syntax meant, how the functions worked, how variables were being used, and how JavaScript interacted with the DOM to update what the player sees. That process was difficult, but extremely educational. By the end, after fixing both logic and presentation issues, I had a playable version of the game on my website.
There were moments when I wondered whether I was wasting time, because this web version was not strictly part of the class. But in the end, it all pointed in the same direction: becoming more comfortable with code, with problem-solving, and with the mental habits of programming. JavaScript is everywhere, and I will eventually need it anyway. Working through it now made the whole experience more valuable, not less.
What this project proved to me is that the course is doing more than teaching Python syntax. It is teaching me how to think computationally. That feels like the real milestone. The Hangman game itself may be simple, but finishing it on my own, then extending it into a playable website version, made me feel that I am genuinely starting to program.