The only purpose of python coding below is to prevent kids from straight forward calculations, which, actually, are boring rather then difficult. In doing so I intend to learn my students pretty old principle “Just think first”
Source: LXer – Recursion in Python. Having fun writing code to help out unhappy kids