the elf ‘self’

Yesterday as I was halfheartedly getting my coffee from the pantry, and got back to my machine, it held a small surprise for me. A surprise that may come as a shock to many of those who read this post. The surprise was the ‘self’ keyword of the python language. I confess, until yesterday I […]

Hailstones

It’s a long due post. I have been thinking about hailstone sequence, and how immaculately it fits human life. For those who don’t know hailstone sequences, please observe the below function: def hailstone(n): seq = [] while n != 1: if n % 2 == 0: seq.append(n) n = n//2 else: seq.append(n) n = 3*n […]