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

[SOLVED] HELP Area Of Yetis

Ok so this lvl i dont really get it, i know what i have to do but dont know how to code it
Any help?
this is the code

# Defeat Yetis.

# The chosen one can stun yetis with a Shout.
chosen = hero.findFriends()[0]

# The power of the Shout is equal to the area of a circle.
radius = chosen.distanceTo(chosen.findNearestEnemy())
# The area of a circle can be calculated with the formula:
area = radius * radius * Math.PI
# Tell the area to the chosen one.

# Don't just stand there! Fight!

Think of it as more a demonstration of math concepts, rather than a coding challenge.

The bonus is that you get to join in the fun too!

Thanks just solved it!

1 Like