► Python Program to Find Numbers Divisible by Another Number


Steps followed:
1. Take the first number as in put from user
2. Take the second number as input from user
3. Check if first number is completely divisible by second number


Program

#Python Program to Find Numbers Divisible by Another Number

# Take the first number as input from user
first_number = int(input("enter the first number "))

#Take the second number as input from user
second_number = int(input("enter the first number "))

#Check if first number is divisible by second number
if(first_number % second_number == 0):
    print("%d is completely divisible by %d"%(first_number,second_number))
else:
    print("%d is not completely divisible by %d"%(first_number,second_number))


Output

enter the first number 125
enter the first number 25
125 is completely divisible by 25

 

enter the first number 878
enter the first number 27
878 is not completely divisible by 27
 





Also Read: