+ 4

This is really tough thing!

Can u guess quickly in the given time that it's exponentional function & u have to do 2^3==8 ? I guessed but it was too late:-))) Some quizzes are just freaking me out:-) function expo($b, $e) { if ($e==0) return 1; $result=$b; for($i=1; $i<$e; $i++) $result*=$b; return $result; } echo expo(2, 3);

7th Jul 2017, 9:30 PM
Val🐯
Val🐯 - avatar
2 ответов
+ 10
This is pretty simple and i'm not so good in PHP (i can't see that syntax), but i can understand what you want to say, i lost many challenges because of math quizzes! I thought something like: "Can a human calculate all this stuff in this short time"...? In most cases yes, generally there was tricks to solve them, so i made a private code where i added most difficult challenges with a short explanation. This helped me to remember and understand something more, maybe can be helpful do the same. :) I updated this code for two days, then i understand i'm too lazy to keep this project updated, take it as a reference: https://code.sololearn.com/Wgtl01o5si3f/?ref=app
7th Jul 2017, 10:12 PM
Maz
Maz - avatar
+ 3
@Maz Thank's Maz! Opposite to you I don't like JavaScript because of the ugly data types conversion, prototyping instead of normal OOP and many other things. However I really like JQuery lib & React.js lib! Strange thing:-)))
7th Jul 2017, 10:22 PM
Val🐯
Val🐯 - avatar