+ 2

Why are so many of the code challenges just Maths?

I didn't get into programming because I'm good at mental arithmetic, in fact the total opposite. I'm good at structure and methodology, I am terrible at mental arithmetic - and yet so many of the coding challenges on this App are pure maths. Like I just had one which was something like (in Python): What's the output of the following: print(5**6*2-(5)) And it gives you, at most, 20 seconds to work that out. I know what that line of code means, but if I wanted to do it in my head, I wouldnt be using a computer to do the maths for me

9th Aug 2022, 9:14 AM
Chris Malowany
Chris Malowany - avatar
3 Answers
+ 4
Yeah, I mean, mental arithmetics isn't necessarily something that should be tested on Sololearn, even if knowing to calculate basic stuff in your head would be better than asking the calculator to do it every single time. In any case, these challenges are given to see if you recognise mathematical operators, but a certain speed is required. I also don't like these types of questions where I have to calculate in a limited time some given expressions (notice that my main field is mathematics and physics), but I believe they really help to form a certain mindset helpful under stressing situations. TIP: when you have these types of questions, pick the more logic one. For example, if you have big bases and exponents, the result shall be big as well.
9th Aug 2022, 9:23 AM
Bonsai
Bonsai - avatar
+ 2
That why I dont play this challanges, it is too little time to answer (and best challangers are exualy know answer because thay played challange 1000 times), questions are repeatiting. To practice programming solve code problems. If you are interesting in this, you may look sites like code wars or leetcode. Also building things, applications, games... Is best way to learn
9th Aug 2022, 9:38 AM
PanicS
PanicS - avatar
+ 1
99% of the challenges don't require mental arithmetic but... STRUCTURE AND METHODOLOGY. Example (5**7)*(1-23**0) Ok.... spend 20 seconds for first expression (I would need 20 minutes) or spend 5 seconds to analyse the structure and further 3 seconds to enter the solution. The hardest mental arithmetic might be 5! = 120. Is 20 seconds not enough time or let's say 10 seconds? Maybe you trapped in too many pitfalls and didn't find the key to a 10 second solution. Try to see the challenges from this point of view. U might be surprised.
9th Aug 2022, 2:16 PM
Oma Falk
Oma Falk - avatar