Output of 21%7 is ( in python)
Answers
Answered by
5
Answer:
Python | Output using print() function.
Explanation:
hope it helps!
Answered by
0
Answer:
The output of 21%7 is 0.
Explanation:
Remainder Operator(%)
In python programming, % is used as the remainder or modulus operator. It is used to find the remainder of the divide operation.
Since 21 is a multiple of 7 and 7 can divide the 21 in 3 times. So the remainder is 0 and the output given by the statement 21%7 is also zero.
Use of Remainder Operator
- The remainder operator is beneficial to check the divisibility of the number.
- It can also be used to check whether a given number is even or odd.
- It can be used with if-else or if-elif ladder to check multiple conditions and decide which block to execute accordingly.
#SPJ3
Similar questions