cs/practical-file/answers/question_12.py

7 lines
276 B
Python

# Question: Write a Python program to check whether a number is divisible by both 5 and 11.
num = int(input("Enter an integer: "))
if num % 5 == 0 and num % 11 == 0:
print(f"{num} is divisible by both 5 and 11")
else:
print(f"{num} is not divisible by both 5 and 11")