EXERCISE

 irfan ibrahimbegoviÄ‡ · February 18, 2015 IS TIHS O.K. FOR SOLUTION OF YOUR EXERCISE , AT THE END OF VIDEO for x in range(1,101):      d=x%4       t=d       if t==0:           print(x)

Replies

 Zac Smith · February 23, 2015 Voicu stefan ... Thanks for the clarification! voicu stefan · February 22, 2015 My mistake.I should use " == " Zac Smith · February 20, 2015 Here was my attempt:for x in range(101):if x%4 is 0:print(x, 'this number is divisible by 4!') Zac Smith · February 20, 2015 voicu stefan ...I don't understand why you used n%4 <= 0:, instead of == or 'is'? voicu stefan · February 20, 2015 for n in range(1, 101): if n%4 <= 0: print(n, "this is divisible by 4")#This is how i mannaged to think it. irfan ibrahimbegoviÄ‡ · February 19, 2015 nice it's a little bit simple than my , I like it  ... sory if my english isn't grammaticly corect. I'm from Bosnia and Herzegovina hehehehhehe Jean DeZonia · February 18, 2015 This is what I did.for n in range(1, 101):       if n % 4 == 0:            print(n)
• 1

Python

128,128 followers