Is it a bug? or should I buy equipment to solve Ogre Encampment?

Hi,guys,in this level I used a simple python statement as below:

#loop:
#    Enemy=self.findNearestEnemy()
#    if Enemy:
#        self.attack(Enemy)
#        self.attack(Enemy) 
#     else:
#        self.attack('Chest')

but have a problem when a Enemy come from upward side, hero can not find him !
I do not know if its a bug? or my programe have problem(I think its a low level,it should not be so hard)? or if I must buy good equipment to add health to go through with this level?
Anybody could help me ?Thank you.

Problem solved: the reason is I dd not know the ‘say()’ have sustained effect.

You need to indent the loop, the else, and the if statements

That, and format your code according to the FAQ

Hello, Hakonan, and welcome. Please read the FAQ prior to your next post,so that you can post your code with “radiant, harmonious formatting.” I’ve done it for you this time, but do so yourself in the future.

My only suggestion is to continue to submit. It will give you a random seed each time.

Ok ,I will,Thank you.