#Python

RPI and SOS in Scheme, Python, and Elixir

Last spring, I played in a 3x3 basketball leage with 14 teams and only 6 regular-season games. The unbalanced schedule made me wonder if we would end up with wonky playoff seeding. I thought it would be fun to calculate the Rating Percentage Index (RPI) a…


Proof of Kaprekar's constant in Scheme, Python, and Elixir

I thoroughly enjoyed this delightful post on Kaprekar's constant, which was new to me. Similar to the post author, I also like to use programming to understand mathematical concepts. I thought it would be a fun exercise to translate the example Ruby code …


From Python to NumPy: random walk example in R and Chez Scheme

As a learning exercise, I decided to translate examples from the book, From Python to NumPy, into R and Chez Scheme. This post describes the random walk example from Chapter 2. All of the code is in this repository so I will only highlight a few pieces of…


Programming horizons revisited

In my second post on this blog, I wrote about my interest in learning new programming languages and my thoughts on how to choose the next language to learn. It's been over a year since that post and I thought it would be worthwhile to reflect on what I've…


Expanding my programming horizons

For many years, I've had intentions of learning another programming language. I would guess that I've done 70-80% of my programming work in R and 20-30% in NetLogo. Those two languages have served me well and I haven't yet been in a position where I was r…