Brittle Morale (HELP)


#1

Hi, I have been stuck on this level for a while and was wondering if you could help me out.

Here’s my code:

def findStrongestEnemy(enemies):
    strongest = None
    strongestHealth = 0
    enemyIndex = 0
    while enemyIndex < len(enemies):
        enemy = enemies[enemyIndex]
        if enemy.health > strongestHealth:
            strongestHealth = enemy.Health
        enemyIndex += 1
    return strongest
    enemies = hero.findEnemies()
    leader = findStrongestEnemy(enemies)
    if leader:
        hero.say(leader)


#2

Also, I was wondering what it means when your code if highlighted neon green?


#3

health != Health. Don’t forget about the right case for properties and variables.


#4

everything below the return statement should not be inside the function