Plutonic Rainbows

Adding

I wrote a simple script for adding that uses a function to hold two variables and then add them together. You create a function by using def and then giving it a name.

# -*- coding: utf-8 -*-

def add(value_1, value_2):
    print "Adding %d and %d together." % (value_1, value_2)
    return value_1 + value_2

cost = add(2345,1234)

print "The cost is: £{0:.2f}".format (cost)

Be sure to use the utf-8 value at the top or else Python will not understand the currency character.

Dedekind Cut - Tahoe

Great new album from Lee Bannon. Tahoe has huge, cinematic sweeps often accompanied by feelings of sadness or unresolved strife. A really excellent addition, if you're into atmospheric ambient works.

Calculating Time

Simple script to calculate days between two dates.

from datetime import *

today = date.today()
past_date = date(1994,2,10)
diff = today - past_date
print "That was %d days ago." % diff.days

I don't understand the need for the asterisk on the first line.

Terekke - Improvisational Loops

Pure 80s ambient style bliss now available on the Music From Memory label. You can order it here.

Revision

Going through the first twenty exercises once again. It will not become second-nature if I do not build revision into my learning. The trick is to make the revisions enjoyable.