#  help with this exercise

**URL:** <https://discourse.codecombat.com/t/help-with-this-exercise/13613>\
**Category:** Uncategorized\
**Created:** [January 19, 2018, 9:53pm UTC](https://discourse.codecombat.com/t/help-with-this-exercise/13613 "2018-01-19T21:53:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiguelAngel](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@MiguelAngel](https://discourse.codecombat.com/u/MiguelAngel)\
**Post date:** [January 19, 2018, 9:53pm UTC](https://discourse.codecombat.com/t/help-with-this-exercise/13613/1 "2018-01-19T21:53:38Z")

</div>

// Destroy the mines!  
// Use say to call out the range to the mines.  
// Use division to calculate the range.

var enemy = hero.findNearestEnemy();  
var distanceToEnemy = hero.distanceTo(enemy);  
// Say first Range: distanceToEnemy divided by 3

hero.say(“Fire!”);  
// Say second range: distanceToEnemy divided by 1.5

hero.say(“Fire!”);

// Say these things for motivation. Really. Trust us.  
hero.say(“Woo hoo!”);  
hero.say(“Here we go!”);  
hero.say(“Charge!!”);

// Now, use a while-true loop to attack the enemies.  
while(true) {  
hero.attack(enemy);  
}

---

<div class="post-metadata">

**Author:** ![MunkeyShynes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munkeyshynes/32/9277_2.png) [@MunkeyShynes](https://discourse.codecombat.com/u/MunkeyShynes)\
**Post date:** [January 19, 2018, 9:56pm UTC](https://discourse.codecombat.com/t/help-with-this-exercise/13613/2 "2018-01-19T21:56:40Z")

</div>

What level is this? Please name the level you are working on and any errors that you are receiving. Also, because you didn’t post your code correctly using the **\</\>** button, we can’t see the structure of the code. From now on, please post your code from the game using the **\</\>** button. There are many people here able and willing to help, but we need some basic information. Help us help you. Thanks.

---

<div class="post-metadata">

**Author:** ![MiguelAngel](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@MiguelAngel](https://discourse.codecombat.com/u/MiguelAngel)\
**Post date:** [January 19, 2018, 11:06pm UTC](https://discourse.codecombat.com/t/help-with-this-exercise/13613/3 "2018-01-19T23:06:30Z")

</div>

is the exercise or level 36 long range division.  
in the backwoods forest.  
Do not know how to solve this exercise

---

<div class="post-metadata">

**Author:** ![maka](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/maka/32/3261_2.png) [@maka](https://discourse.codecombat.com/u/maka)\
**Post date:** [January 26, 2018, 1:37am UTC](https://discourse.codecombat.com/t/help-with-this-exercise/13613/4 "2018-01-26T01:37:01Z")

</div>

You haven’t asked any questions either – we aren’t just going to tell you the solution. Is there a specific question you have about this level?
