How to check the number is divisible Project -5

 Divisibility Test


 

This is the 5 project from us fro learning python get continue with us and we will provide you more about it



d=int(input("Enter the value "))
a=d%2
b=d%3
c=d%4
d=d%5
e=d%6
f=d%7
g=d%8
h=d%9
i=d%10
if a==0:
    print("This number is divisible by two ")  
elif b==0: 
    print("This number is divisible by three")  
elif c==0: 
    print("This number is divisible by four")  
elif d==0: 
    print("This number is divisible by five ")  
elif e==0: 
    print("This number is divisible by six")  
elif f==0: 
    print("This number is divisible by seven ")  
elif g==0: 
    print("This number is divisible by eight ")  
elif h==0: 
    print("This number is divisible by nine ")  
elif i==0: 
    print("This number is divisible by ten")  
else:
    print("This in not divisible by any of the number from 1 to 10 ")

0 Comments