Yesterday, we wrapped up our study of Python by working through a rather complicated program of Hangman. You can see the source code here. It has several defined functions, lots of else-if statements, for loops, and lists. I think the girls were a little overwhelmed; by the time we got to the end of the program, their eyes were glazed over!
So, for a fun change of pace, we began working with MIT’s AppInventor. This is a website that allows the user to create Android apps. It’s very similar to Scratch, which we worked with in the beginning of this coding minicourse. You can login with a Google account, and it automatically saves your projects as you build them. There are some excellent tutorial screencasts that walk the beginner through the basics. After about 45 minutes, you will have created your own working smartphone app! The first one we built had a picture of a cat meow when you tap the phone’s screen.
Here’s a screenshot of the designer page, where the components of the app are put together:
The left pane contains the various components and layout options. The middle pane simulates the phone’s screen. The third and fourth panes let you modify each component’s properties.
The Blocks page is where you actually program the components of the app. As you can see below, it works just like Scratch, with drag and drop blocks of code:
Today, we will build a painting app that lets the user take a picture and paint on top of it.