How does modulo (% ) work in Python program?

For example, 1992, 1996, 2000, 2004, 2008…2016 are leap years. To find out if a year is a leap year or not, you can divide it by four and if the remainder is zero, it is a leap year. The Python program below asks the user to enter a year. There, I used modulo (%)and used the remainder value to display the result of the entered year.
For More Information Please Refer:


You May Also Like to Read: