[SOLVED] Help needed with the hunt begins

yes, it still doesn’t work …
here’s the new code:

def averageSize(burls):
    sum = sumSize(burls)
    return sum / burls.len

def sumSize(burls):
    totalHealth = 0
    for burl in burls:
        totalHealth += burl.size
    return totalHealth
    pass

while True:
    burls = hero.findEnemies()
    averege = averageSize(burls)
    hero.say(averege)

Here put

len(burls)
1 Like

what am i supposed to do with the sumSize function?

burls.length is for Java Script, len(burls) is in Phyton.

doesn’t matter because i finished the lvl :rofl:

Congratulations for completing the level! :partying_face:

@AnSeDra actually ‘.length’ is also supported in PY too…give it a try, in place of len()

3 Likes

I never tried it. But I will. Thanks for telling me! :slightly_smiling_face:

1 Like

yep it works @AnSeDra

2 Likes