Today’s Programming: Scratch and Python


Starting off with this code from the Raspberry Pi foundation, Sam made his first ever video game. I then modified it so the shark would close his mouth when he eats the fish and added a sound at the end when a score of 5 was reached. Here’s a video of Sam playing his game:


For Python I continued to work on writing unit tests for my Extra Life Donation Tracker. Doing so helped me find a few bugs and a few functions that I was able to combine to reduce the code complexity. Overall, this has been a very productive phase for the project, even if it has been very frustrating figuring out how to mock out certain functions like those reaching out to the net or those writing to disk. Depending on what I can do with some help that someone offered me on reddit, I will either go back to the file to try and finish that one up or I may declare unit testing completed for now and tackle that later when I’ve learned even more about how Python works and how to test it.