Learning Python has been an emotional rollercoaster for us. Never in my life have I experienced such intense frustration followed by pure glee and satisfaction about 5 minutes later. Today was our second session in saga of learning Python, in which we had aimed to create our first small project together. Because we were having trouble coming up with a project that would be achievable within our scope, as we aren’t very familiar with the extent our skills can be applied yet, we asked generative AI chatbot ChatGPT to think of a small beginner level project to challenge us with, and it came up with: the infamous number-guessing game. Of course, we were up for the challenge!

Although we already had some idea of what our code would need to look like based off of what we already knew, we did have to refer back to some W3Schools tutorials for refreshers on certain things, such as != and += notations for making statements. Today, we also learned how to use the Python shell as opposed to the main console, and we learned how to create a file and learned how to run a file in the shell. We were having trouble understanding this concept, so we called longtime friend and Python enthusiast Nik.

After a few unsuccessful runs with Nik troubleshooting in between, we finally found success! Here is the code to our new game:

The player enters random numbers until they guess the correct one, getting hints on which way to steer their guessing based off of their last guess. To avoid crashing, we also have a protective line for non-integer entries. Here is an example of someone playing our game:

The feeling of triumph when we pressed ‘Run’ and red text didn’t show up was a feeling like no other.

Goals for Next Session

Now that we have started built ourselves a solid foundation in Python, and seeing as we are now in our final month of classes, Lyndsay and I will be starting our final project in our next few learning sessions. Although our learning has by no means progressed to the point that we were aiming for when we started this process, we want our final project to be part of the learning process as well, rather than simply a reflection/ show of what we had learned beforehand. Today was actually really fun, and now Lyndsay and I are itching to get started on our next task!