+ 6

# Python loop

I need to print the number divisible by 17 starting from 200. How to do that with the while loop? No while loop version of mine: a=200 b=300 #or any other number supposedly more than 17 for i in range(a, b): if i%17 == 0: print(i) break;

14th Sep 2020, 11:52 AM
JSiegerheim
+ 2
a=200 while a: if a%17==0: print(a) break else: a+=1
14th Sep 2020, 12:09 PM + 11
a=200 b=300 while a<=300: if a%17==0: print(a) a+=1
14th Sep 2020, 11:58 AM + 3
greaaaaaaaat! it worked
14th Sep 2020, 12:10 PM
JSiegerheim
+ 3
vijay-busy a=200 while a: if a%17==0: print(a) break else: a+=1 😀 🍻 a-=1; IMHO 🙄
15th Sep 2020, 3:30 AM
Sanjay Kamath + 3
a=200 b=300 while a<=300: if a%17==0: print(a) a+=1
15th Sep 2020, 9:37 AM
Psͥycͣhͫ๏F̶ + 3
Hello a=200 while a>0: if a%17==0: print (a) break
15th Sep 2020, 2:54 PM
Kanchan Dixit + 2
Z = 200+ 17-200%17 as loop z=200 while z%17: z+=1 print(z)
14th Sep 2020, 3:26 PM
Oma Falk + 2
a=200 while a <= 300: if a%17==0: print(a) break else: a+=1
15th Sep 2020, 12:34 PM
ravi k vishnubhotla + 2
16th Sep 2020, 9:21 AM
+ 1
is it possible to do that without b or the range, meaning from 200 to infinity, as 300 an option that occured to me
14th Sep 2020, 12:00 PM
JSiegerheim
+ 1
300 is not in the statement
14th Sep 2020, 12:00 PM
JSiegerheim
+ 1
ok! I think I did! All this stuff is new to me) sorry for ignorance
14th Sep 2020, 12:14 PM
JSiegerheim
+ 1
n=600 if a in range(1,n): print(a)
15th Sep 2020, 10:02 AM
+ 1
x = 200 while (True): if x%17 == 0: break else: x=x+1
15th Sep 2020, 4:31 PM
Satvik Virmani + 1
x = 200 l = [ ] while True: if x%17 == 0: l.append(x) else: x+=1
15th Sep 2020, 5:11 PM
Ravi Teja + 1
JSiegerheim a, b=200, 300 while a<b: if not a%17: print(a) break a+=1
15th Sep 2020, 10:09 PM
LastSecond959 0
a=200 while a: if a%17==0: print(a) a+=1
14th Sep 2020, 12:01 PM 0
200 to infinity
14th Sep 2020, 12:02 PM 