Code a loop in python

I got as far as this… cries in the corner