# [source code] Python Programming Tutorial - 10 - comments and break

 Bucky Roberts · August 27, 2014 ``magicNumber = 26for n in range(101):    if n is magicNumber:        print(n, " is the magic number!")        break    else:        print(n)'''*** Challenge 1 ***Create a program that lists all the numbers between 1-100 that are divisible by four.Good luck!'''``

## Replies

 Aubree Keegan · August 27, 2014 I haven't seen the video, but here is my reply for the challenge. Please make more challenges, they are fun! ``for x in range(101):    if x % 4 is 0:        print(x, "is divisible by zero!")`` Yoncho Yonchev · August 27, 2014 Challenge accepted!!!`` [ x for x in range(1,101) if x %4 ==0]``Solved in 1 line of code. and if you want to print the answer: ``print(' '.join([str(x) for x in range(1,101) if x %4 ==0]))`` Theo Jay · September 7, 2014 Programming challenge (HW):# print numbers divisible by 4counter = 0 # introduced to help produce a tablefor num in range(1,101):    if num % 4 is 0:        print(num, " ", end="") # print elements on same line        counter += 1        if counter is 5:            print()            counter = 0 Gary Murphy · September 10, 2014 ``for num in xrange(101):    if num%4==0:        print num, 'is divisible by 4'`` ArulPrasad Sundaram · April 23, 2017 for n in range(1,101):    if n%4 is 0:     print(n,"is multiple of 4")If you use for n in range(101)you will "0" as one of the answer.
• 1

## Python

131,113 followers