I was looking at python since its cost of ownership is free, there are lots of online resources, and we can do a lot with it. I also wanted to brush up on my Python knowledge so this seems to be a good match.
I found the O'Reilly book, Python for Kids, as a guide. But I am sure we are going to go off course. The nice "hook" with this book is that we are, by the end, going to create a game. Once I said that, it was like I entered a Shangri-La of enthusiasm.
We had a couple of sessions getting use the environment, understanding what a variable is. What we can do with it. Some math operations running the interpreter. And then we moved into storing our commands in files so that we did not have to continually retype our program.
But then we created an assignment for ourselves: The times table. This is what we decided to do:
1. Take two numbers from the user, the times table to output, and its range, how much of the table we wanted to product.
2. For each value in the range calculate the times table entry.
3. Output it for the user.
4. Profit. (Why do people say this?)
This little assignment taught us:
- About user input.
- How user input is a string, even if they type in a number, since a number can be a string.
- Converting that input string to a number.
- How a for loop helps us count through the table.
- Performing the calculation.
- Printing output.