About a year ago my eyes would’ve glazed over and I would’ve not read a blog that began with a screenshot of computer code as I just did. Hopefully you’re still with me even if you’re not yet sure why anyone in their right mind would learn how to talk to computers in their spare time. This blog is the third in a series about my experience learning the basics of Python programming language in support of my professional dream to use data to end hunger and promote nutrition. This is the week where you get to see some of my work in the Rice University Coursera course I am auditing this summer. This is where perhaps you’ll have an “aha” moment like I did about how cool it is to be able to make your computer listen to you.
During Week 0 of the course, I learned about statements, expressions and variables. The image at the start of this blog is an application of that lesson in a web-based CodeSkulptor environment. This program generates random numbers when two dice are rolled and adds them together and also performs basic math functions. The satisfaction I felt when the program worked with no red error messages was priceless and encouraging. Logic, Conditionals and functions were covered in week 1. The mini project at the end of week 1 mimics the game rock-paper-scissors-lizard-spock.
Ok, Laura – show us something with pretty pictures, please! This text is killing me!
During the rest of the course I learned about event-driven programming and how to use GUIs to draw shapes and make interactive games with a bit more color such as Guess the Number. I learned about lists and modeling motion to create a game called Pong. I gained the rudimentary Python programming skills to allow a user to enter a value and have the computer return something on a canvas. My favorite activity was making the output text read fun things like “Women coders rock” and “Go Hoosiers!” To see all the final animated images and related Python code, visit my GitHub site. I know this is just the beginning into the world of Python and that I have a lot more to learn but I am excited about this great start!