+ 1
Can anyone help me out with percentages
I don't get it
4 Antworten
+ 1
So basically it is how many times a number fits in another one. So 7%2 == 1 means that how many times does 2 fit in 7? 3 times. But 3*2 = 6 so the remainder is 1. 6*2 + 1 = 7. So if it was 10%2 it would be 10%2 == 0 because 2 fits exactly 5 times in 10 so there is no remainder. Hope this helps.
+ 1
percentages as in how much 35% is out of 200 = 70? or as in percentage marks in code = modulo, basically its remainder, if you divide two numbers, it goes into the dividee only so many times and how much it lacks from the second full number is the remainder/modulo . 5%2=1 since 2 goes into 5, 2 times and it needs 1 to go the third time
0
how do I represent that in a code where your asking for a score and it has to be a certain percentage to pass
0
well then you are talking about percentage calculations, not modulo. Well the most simple way would be to make the max score 100, since score of 1 is 1% and score of 61 is 61% so the only calculations you need is to score the questions by their difficulty.
I'd check math websites for basics on percentage calculations. There are several calculations to be used in different situations when working with percentages :)
https://www.helpingwithmath.com/by_subject/percentages/per_calculating.htm
that is quite simply explained