213k views
1 vote
2. Daduan is explaining to a colleague the various arithmetic operators that Python has available. Which of the following symbols should he use to explain what a modulus operation is?

1 Answer

3 votes

Answer:

The symbol that represents the modulus operator is %

Step-by-step explanation:

In Python programming language, the % sign is used to perform modulus operation.

Take for instance:

2 modulus 3 will be written as: 2%3.

The result of the operation is to return the remainder of the division.

So, the above expression will return 2 because 2 divided by 3 is 0 remainder is 2

User AeroSun
by
4.3k points