Modulus vs Percent

home

no hurry, no pause.

2024-01-04

Why is the % character a “modulus” and not a “percent”? Mostly that’s just how the designers chose to use that symbol. In normal writing you are correct to read it as a “percent.” In programming this calculation is typically done with simple division and the / operator. The % modulus is a different operation that just happens to use the % symbol. (Shaw, 2017)

Reference

Shaw, Z. (2017). Learn Python 3 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code (4th edition). Addison-Wesley Professional.