Thursday, 22 October 2026

84 - CLASS 11 COMPUTER SCIENCE WITH PYTHON PRACTICAL FILE

      Practical No : 84 :Write a python program to check if a number is divisible by 5 and 7.

 

num = int(input("Enter a number: "))

if num % 5 == 0 and num % 7 == 0:

    print(f"{num} is divisible by both 5 and 7.")

else:

    print(f"{num} is NOT divisible by both 5 and 7.")

No comments:

Post a Comment