Program to check if a number is divisible by 3 by In this Python if else program we will check if a number is divisible by 3 or not. Print the number divisible by 3.Divisibility test: The divisibility rule for 3 states that a number is completely divisible by 3 if the sum of its digits is divisible by 3 Steps to solve the programs Take a number as input through the user.Check whether that given number is divisible by 3, using an if else statement.Print the respective output. num = int(input("Please enter value :")) if num%3 ==0: print("Number is divisible by 3:", num) else: print("Number is not divisible by 3 :", num) Output Please enter value :21 Number is divisible by 3: 21 Please enter value :25 Number is not divisible by 3 : 25 Next get all the numbers divided by 3 from 1 to 30. Related programs If else program to get all the numbers divided by 3 from 1 to 30. If else program to assign grades as per total marks. Python program to check the given number divided by 3 and 5.