Most people are familiar with basic operators within a language. These operators include addition (+), subtraction (-), multiplication (*) and division (/). However, there’s another operator which is very useful. Programmers use this a fair bit. It’s called Modulus. The symbol that represents modulus is the percent sign (%).

This video will give you an explanation of modulus and show you a number of examples. Then you will be shown an example of how modulus is used when you want to create a random flip coin project to help teach probability.

Cheers

All Comments
Sort by:  Most Recent
2020-11-15 14:45:34

One more question Phil. What is the result of 1%2 (ie smaller % bigger)? We are talking about “the remaining part”, so is it 0 or 1?

Like
2020-11-14 17:24:16

Thank you. This is a great explanation “from scratch” up to its application in Captivate. Modulus extends the Captivate functionality a great deal. Actually, JS does

Like