With Year 9 exams next week, I spent some time today revising some software development concepts with my class. With the end of NCSS Challenge ending a few weeks ago, it’s been a while since my students last coded in Python.
The focus today was on errors (ha!) particularly desk-checking and variable tracking. So, I wrote this code on the board:
I got student volunteers to write out the values for variables: sites, mysites, i, len(mysites) and print.
Short as this code may be, it provided plenty of opportunities to revise a fair bit of content. Anyway, the sites the girls elected to have were Google, Apple and Sony, so print showed:
Option 0 Google
Option 1 Apple
Option 2 Sony
We then went on to editing the code to start printing from Option 1, instead of 0, etc., followed by this bit code (with opportunity to correct syntax errors for relational operator and if statement):And thus updating the value of print to show:
Option 1 Google
This is where we’re going
and I kept writing ‘on November 5′
“We’re really going to Google?”
“Are we really?”
Plenty of squeals and smiles.
To which I can only reply, “Wasn’t that a fun way to break the news?” *do it in code*
Two birds with one stone. And happy students to boot. Got to love that!
That is so geeky… And so cool 🙂
thanks. I certainly thought so, too. 🙂
What an awesome opportunity for the girls! 🙂
Love the way you broke the news too.