Some python code I wrote when I tried to learn Python