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