Its early August, and the beginning of the next academic year seems an infinite amount of time away, but the two months will go quickly. This summer I am doing what I wanted to do last summer but didn’t have time for, which is to add a couple of optional assignments to my second-year computing teaching.

I enjoy teaching computing, but one challenge is a very wide spread of computing abilities. This means that that the assessed assignments don’t really stretch the students who are really good at computing. So this year I will provide a couple of optional ones, that they can do for fun.

Above is what is called a fractal, I produced this from the second of these optional assignments. It was easy to do, the program only had 39 lines of code.

The course is on doing numerical maths on a computer, and part of this is solving equations on a computer. One of the basic features of solving an equation on a computer is that you always need to start with a guess at the value of *x,* which if it is reasonably close to the value of *x* that solves the equation, is improved by the program until you have a very accurate solution.

Usually, unless the equation is nasty, a reasonable first guess at *x *is easy to find. But sometimes things can be a bit more fun. The fractal above shows what can happen in some cases. It is just a plot in which at each point, if you use it as a guess for *x*, then the pixel is coloured red if then you go to the correct solution, and coloured white if the guess is no good, it does not lead to a solution. [It is a 2D plane as here *x* is a what is called a complex number, so has two bits to it.]

The fact that it is a fractal means that for many (infinitely many in fact) points, you can pick a pair of guess for *x *which are very very close to each other, but one guess will work and the other won’t.

I think there is an educationally useful message here: think about the initial guess you make for *x.* Also, a very pretty picture, which also helps.