How To Use If And While Function In Python