Programming Examples

Python program to print all buzz numbers between 1 to n


Write a Python program which accept the value of n and Print all the buzz numbers between 1 to N.

n=int(input("Enter the value of n: "))
print("Buzz Numbers between 1 to ",n," are: ")
for a in range(1,n+1):
    if a%7==0 or n%10==7:
        print(a,end='\t')
Output

Enter the value of n: 200

Buzz Numbers between 1 to  200  are: 

7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz