# I need help on sarven desert

**URL:** https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315
**Category:** Level Help
**Created:** [June 13, 2021, 10:48am UTC](https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315 "2021-06-13T10:48:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![XxX\_Mem0\_XxX](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/xxx_mem0_xxx/32/22397_2.png) [@XxX\_Mem0\_XxX](https://discourse.codecombat.com/u/XxX_Mem0_XxX)
#### Post date: [June 13, 2021, 10:48am UTC](https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315/1 "2021-06-13T10:48:53Z")

</div>

I cant solve Cubic Minefeld. I dont know what i did wrong. Please  
help.  
 ![Shared with CloudApp](https://p89.f2.n0.cdn.getcloudapp.com/items/p9uAGZ5G/44f9b789-cb84-4f78-b2f4-45b00f52e8de.jpg?source=social&v=f5e848dd81c5c901dbec575b1738154f)

---

<div class="post-metadata">

### Author: ![jka2706](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jka2706/32/13636_2.png) [@jka2706](https://discourse.codecombat.com/u/jka2706)
#### Post date: [June 13, 2021, 7:10pm UTC](https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315/3 "2021-06-13T19:10:36Z")

</div>

Hi,

You want a function that is very similar to the one that’s above.

If we use the mult function, and try to find mult(4,5), then this calculates 4+4+4+4+4, which outputs 20.

We are trying to write the power function, so if we try to find power(4,5) then we want it to calculate 4x4x4x4x4 (which incidentally will output 1024).

The power function will be really similar to the mult function - what is the small change that you need to make?

Post again if you need more help.

Jenny

---

<div class="post-metadata">

### Author: ![XxX\_Mem0\_XxX](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/xxx_mem0_xxx/32/22397_2.png) [@XxX\_Mem0\_XxX](https://discourse.codecombat.com/u/XxX_Mem0_XxX)
#### Post date: [June 20, 2021, 10:51am UTC](https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315/4 "2021-06-20T10:51:33Z")

</div>

Well, thank you for helping, but I couldnt quite understand what you mean.

---

<div class="post-metadata">

### Author: ![jka2706](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jka2706/32/13636_2.png) [@jka2706](https://discourse.codecombat.com/u/jka2706)
#### Post date: [June 20, 2021, 7:47pm UTC](https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315/5 "2021-06-20T19:47:34Z")

</div>

Ah OK. Do you know about powers? Ie what “two to the power of three” means?

Jenny

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/chaboi_3000/32/48486_2.png) [@Chaboi\_3000](https://discourse.codecombat.com/u/Chaboi_3000)
#### Post date: [June 21, 2021, 1:16am UTC](https://discourse.codecombat.com/t/i-need-help-on-sarven-desert/29315/6 "2021-06-21T01:16:49Z")

</div>

To make things simple, you know what the ×(Multiplication) symbol does right? It’s basically adding the same number `n` amount of times. ie 5 × 7 can be expanded into:  
5 + 5 + 5 + 5 + 5 + 5 + 5 = 35.

Now imagine powers as something like multiplication, except the + symbol is now ×. Hence 5 to the power of 7 would be something like:  
5 × 5 × 5 × 5 × 5 × 5 × 5 = 78125.

In the function power, it’s taking in two arguments, `number` and `exponent`. So if you were to write the function in pseudocode, it will be something like this:

1. In variable `total`, for `exponent` amount of times, `number` will be multiplied by `number`.
2. Return `total`.

If you wrote the function correctly, `hero.say(power(7,4))` will make the hero. say `2401`.
