Dremendo Tag Line

Check multiple of 5 in Python

if else - Question 5

In this question, we will see how to check if a number is a multiple of 5 or not in Python programming using the if else statement. To know more about if else statement click on the if else statement lesson.

Q5) Write a program in Python to input any number and check if it is multiple of 5 or not. A number is multiple of 5 if it is divisible by 5.

Program

n=int(input('Enter a number '))

if n%5==0:
    print('Multiple of 5')
else:
    print('Not Multiple of 5')

Output

Enter a number 10
Multiple of 5
video-poster