Could anyone tell me why this code works

```
while self.now() < 20:
self.say("message")
while self.gold < 60:
item = self.findNearest(self.findItems())
coins = self.findItems()
coinIndex = 0
while coinIndex < len(coins):
coin = coins[coinIndex]
if coin.value > 1:
self.moveXY(coin.pos.x, coin.pos.y)
coinIndex += 1
while self.pos.x > 16:
self.move({'x': 15, 'y': 38})
self.buildXY("fence", 21, 37)
```

while this code doesn’t

```
while self.now() < 20:
while self.gold < 60:
item = self.findNearest(self.findItems())
coins = self.findItems()
coinIndex = 0
while coinIndex < len(coins):
coin = coins[coinIndex]
if coin.value > 1:
self.moveXY(coin.pos.x, coin.pos.y)
coinIndex += 1
while self.pos.x > 16:
self.move({'x': 15, 'y': 38})
self.buildXY("fence", 21, 37)
```

For some reason the self.say makes it work. why is this