Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[SOLVED]I don't understand the hunt begins

I don’t understand the hunt begins, its something I don’t understand, could you explain
I does not matter, but here is my code

def averageSize(burls):
    sum = sumSize(burls)
    # Remember the average is the sum of the parts divided by the amount!
    return sum / len(burls)

# This function should return the sum of all the burls sizes.
def sumSize(burls):
    # Implement the sum function using the burls 'size':
    ProbablyNeedAvariableOrSomething = 0
    pass

while True:
    # Find the average size of the burls by calling the 'averageSize' function.
    averageSize("burls")
    # Say the average size of the seen burls!
    hero.say(averageSize("burls"))

@QinWentian for your while true loop you need to have

burls= hero.findEnemies()

then use a variable to store your average size function like this
average= averageSize(burls)
then you should say the average

then for your sumsize function you should
make a totalHealth variable
use a for loop
add the burls size to total health
then return total health

Ok, I will give that a shot

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.