Update flooding.py

updated while loop in flooding.py