Monday, 23 June 2008
Short break
No posts in the next couple of days due to school & work deadlines approaching at speed.
Monday, 16 June 2008
More on strings and data in general
IDLE 1.2.1 #That's my Windows Python GUI
>>> x = 'hello'
>>> y = 'll'
>>> x in y
False
>>> y in x
True
>>> x = 'hello'
>>> y = 'll'
>>> x in y
False
>>> y in x
True
Wednesday, 11 June 2008
Comic relief #1
Looking at all the spamify() functions in my Python manuals reminded me of the great heritage Python advertises and at the same time gave me an idea about making this blog a tad more colorful. The first of the comic reliefs. A true classic.
Thursday, 8 May 2008
Simple math
#! /usr/bin/python
# kg 2 stone converter
print "Mass in kilos?"
mass_kg = int(raw_input())
mass_stone = mass_kg * 2.2 / 14
print "Mass in stones is" + str(mass_stone) + " stone."
# kg 2 stone converter
print "Mass in kilos?"
mass_kg = int(raw_input())
mass_stone = mass_kg * 2.2 / 14
print "Mass in stones is" + str(mass_stone) + " stone."
Subscribe to:
Posts (Atom)
