I noticed a lot of people (and me too) have trouble with this one initially, so I decided to add it here to save people time so they can understand it sooner and continue the learning rather than get hung up on more advanced details if searching about it.
% - Modulus explained -
100-25*3%4
answer 97
Why -
25*3%4
25*3=75
75%4
answer 3
How it works -
75 divided into 4= 18 times
18x4=72
75-72= r3
%=3
Actual calculation at the final stage is -
100-3
so it is why the answer was 97
First of the ex3 explained
3+2+1-5+4%2-1/4+6
3+2+1=6
6-5=1
4%2=0 (4 divided into 2=2, zero remains, modulus %=0)
1+0=1
1/4=0 (1 cannot divide into 4 using whole numbers)
1-0=1
1+6=7
so it is why the answer was 7
I used Python calculating to work it out.
Just open python in terminal then trial error the various breakdowns until I understood what was happening.
Which was part of the #2 extra practices, so it also means can multi-task and 2 things at same time, if trying this.
I hope it helps someone else learning if they get stuck on modulus.
% - Modulus explained -
100-25*3%4
answer 97
Why -
25*3%4
25*3=75
75%4
answer 3
How it works -
75 divided into 4= 18 times
18x4=72
75-72= r3
%=3
Actual calculation at the final stage is -
100-3
so it is why the answer was 97
First of the ex3 explained
3+2+1-5+4%2-1/4+6
3+2+1=6
6-5=1
4%2=0 (4 divided into 2=2, zero remains, modulus %=0)
1+0=1
1/4=0 (1 cannot divide into 4 using whole numbers)
1-0=1
1+6=7
so it is why the answer was 7
I used Python calculating to work it out.
Just open python in terminal then trial error the various breakdowns until I understood what was happening.
Which was part of the #2 extra practices, so it also means can multi-task and 2 things at same time, if trying this.
I hope it helps someone else learning if they get stuck on modulus.