Goal 3 – learning Python

python logo

So, after getting through enrolling at UC I have managed to get onto Learn2 (UC Moodle site) and into COCS121. So far so good. Have bought the recommended text book (Practical Programming) and loaded on iPad. Have got link to the interactive text book (How to Think Like a Computer Scientist), which looks pretty cool.

Have started catching up on the lectures that I missed due to not being enrolled. Am finding it quite interesting and not stressful so far!

There are 10 other teachers from around the country enrolled in the course, all doing it by distance and the set up for us is pretty good. I am going to have to allow probably at least 5 hours a week to it to keep on top of everything. Which will mean a very very busy first half of the year.

Quite excited about it though. Oh and if it wasn’t enough am of to the Rails Girls Wellington 2 day workshop in a couple of weekends. (@RailsGirlsWgtn)

Goal 3: learn Python so can teach effectively and engage students in this learning area.

Footnote: a small thing but see real life application for me, writing program to convert metres to feet, as I am mad on surfing!
Was going to link to text file but Google Drive having a hissy fit, so this is what I wrote:

def m2ft():
metre = float (input (“Wave height in metres: “)) return metre * 3.2808
print(“Wave height in feet is “, round (m2ft(),2))

So then how do sites like this – metric-conversions.org – make it come up with feet and inches?? Rather than decimal points. Something I will hopefully learn.

Just thought of another use – in PE students run the Cooper 12 minute run and we then get them to calculate what there time would be over 4kms. Would be cool to have little program to do that quickly (I am sure I could find one on web but cool doing myself!). Even better would be getting the students to make it themselves – cross curricula!

Advertisements

3 thoughts on “Goal 3 – learning Python

  1. import math

    def m2ft():
    metre = float (input (“Wave height in metres: “))
    return metre * 3.2808

    val=m2ft()
    feet=math.floor(val)
    inches=(val-feet)*12

    print(“Wave height in feet is ” + str(feet) + ” feet, ” + str
    (inches) + ” inches”)


    “math.floor” rounds the value down. I haven’t rounded the inches value

  2. Don’t know how best to upload these:

    pic.twitter.com/R5eOI50Sjz
    pic.twitter.com/cWIYUqcLw1


    Disclaimer: all code has been thrown together quickly, no warranty provided 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s