Part 2: Python on L-plates

She is a little green but Jacqui believes she will get the hang of python. Picture:

by Jacqui Fenwick
If programmers are professional drivers - driving software, climate models, and essentially the entire digital age as we know it - then I am now on my programming L-plates. I drive slower than everyone else, I make mistakes and I need some guidance and supervision until I've had more practice... but I'm learning!  By the end of this research project, I'd like to be on my P-plates.  Not P for prodigy or professional or even programmer, just P for proficient will be fine!

This week I've hop-scotched between online programming tutorials and investigating the actual data and programming scripts which I will be using in my work.

The programming language which I'm learning is 'Python'. The benefit of Python is that the software can be accessed free and there is plenty of scripting material available online. Like learning any foreign language it takes time and practice to learn, so I have set aside an hour or two each day to work through a python-for-beginners tutorial. For anyone who is keen, I would recommend the Code Academy as a good place to start.

On the climate extremes side of things I have begun de-constructing the heatwave-identifying script which I will use for much of my research. A python script has already been developed which takes temperature data as an input and returns to you a whole suite of facts regarding the nature of heatwaves all across Australia each year. Magic! With some dedicated annotating, googling, head-scratching and thinking, I have slowly worked through the script to understand what each line does and what will happen if I change it.

Where to from here?

>>> message= ["see", "will", "we", "guess", "I"]
>>> print " ".join(message[::-1])
>>> print ' In week %s!' %(3)

                        I guess we will see
                        In week 3!

UNSW logo ANU logo Monash logo UMelb logo UTAS logo