can someone pls help me
here is my code
First, defeat 6 ogres.
Then collect coins until you have 30 gold.
This variable is used for counting ogres.
defeatedOgres = 0
This loop is executed while defeatedOgres is less than 6.
while defeatedOgres < 6:
enemy = hero.findNearestEnemy()
defeatedOgres += 1
Move to the right side of the map.
This loop is executed while you have less than 30 gold.
while hero.gold < 30:
# Find and collect coins.
targetpos = coin.pos
# Remove this say() message.
hero.say(“I should gather coins!”)
Move to the exit.