Dremendo Tag Line

Print remainder of a division in Python

printf() - Question 11

In this question, we will see how to print remainder of a division in python programming using the print() function. To know more about print() function click on the print() function lesson.

Q11) Write a program in python to find the remainder by dividing a=5 by b=2.

Program

a=5; b=2
print('Remainder = {}'.format(a%b))

Output

Remainder = 1
video-poster