how to write a while loop in python

Responsive image
source