Programming Examples

Python program to check number is buzz number or not


Write a python program to input a number form user and check whether number is buzz number or not.

A number is said to be Buzz Number if it ends with 7 or is divisible by 7.

Solution

#python program to check number is buzz number or not.
num=int(input("Enter any Number : "))
if num%7==0 or num%10==7:
    print(num, "is a Buzz Number")
else:
    print(num, "is a not a Buzz Number")
Output

Enter any Number : 14

14 is a Buzz Number

>>> 

========================= 

Enter any Number : 77

77 is a Buzz Number

>>> 

========================= 

Enter any Number : 10

10 is a not a Buzz Number

>>> 

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad