After a couple of years of building up the courage to try, I finally attempted to incorporate computer programming in my mathematics classes. The reasons for doing so are two-fold:
- Computers are everywhere, and it seems like an educated person should have some experience in programming them.
- Programming is a fantastic tool for getting students to understand algorithms.
In particular, I am teaching elementary education majors this semester, and I am starting by having them code the standard addition algorithm for base six numbers. Here is how I set up the exercise:
- I reserved a classroom set of laptop computers for the day.
- I decided to use Python. This is because it is a useful language, the syntax is relatively minimal, and it is relatively easy to read.
- My students were to input numbers as lists; furthermore, I made the requirement that their program only work with four digit numbers. That is, would be inputted as . These were both done to eliminate the coding that would not help them understand the algorithm better.
- I coded up a similar base six subtraction algorithm. I gave them a copy of my code to help them get started on the addition algorithm (the addition algorithm is substantially easier to code). (I also gave them a copy of a program that will take a sum of numbers of arbitrary length—not just four-digit numbers. I still, however, kept the inputs as lists).
- My school does not have a Python interpreter on its network, and I cannot request one until the summer (there are only two times per year that I can request software—before each semester). Instead, I decided to use Sage Online as my interpreter.
I explained this plan to my students, and they seemed game. However, there was a serious problem with using Sage Online. For some reason—perhaps because all of the computers were being funnelled through the same wireless router—one student could see everyone else’s worksheets on Sage, and no one else could see any worksheet.
At this point, I decided to delay the programming project until Monday. Then, I will attempt the same process, only using codepage instead of Sage Online.
Does anyone have a suggestion for how to improve this?