Python program to check whether a number is divisible by 5 and 11 or not.

Subject: Python Programming

Contributed By: Nunugoppula Ajay

Created At: February 24, 2025

Question:


Write a Python program to check whether a number is divisible by 5 and 11 or not.

Explanation Video:

Custom Image

Explanation:

 

 

Source Code:
# Get input from the user
number = int(input("Enter a number: "))

# Check if the number is divisible by both 5 and 11
if number % 5 == 0 and number % 11 == 0:
    print(number, "is divisible by both 5 and 11.")
else:
    print(number, "is not divisible by both 5 and 11.")
Input:
Test case-1:
Enter a number :  55
Test case-2:
Enter a number : 100
Output:
Test case-1:
55 is divisible by both 5 and 11.

Test case-2:
100 is not divisible by both 5 and 11.
Share this Article & Support Us:
Status
printf('Loading...');