Help Programming MBLOCK Robot?

The first while loop spins the robot until it sees the object. The second while loop is the one that runs the motors to move forward while the object distance is between 80 and 20 cm from the sensor.