+ 3

x = 0 while x <= 20: print (x) x += 2

19th Oct 2016, 2:38 PM
Blas Ortiz
Blas Ortiz - avatar
4 Answers
+ 16
Indentation matters in python: x = 0 while x <= 20: print(x) x += 2
19th Oct 2016, 3:40 PM
Zen
Zen - avatar
+ 1
@Mayor2k as far as I am aware that should not break the code and the spaces make it easier to read. @Zen you need to indent everything after the colon for it to be in that count controlled loop.
3rd Nov 2016, 2:51 PM
Callum Lambert
Callum Lambert - avatar
0
ŠøсŠæŠ¾Š»ŃŒŠ·ŃƒŠ¹ тŠ°Š±ŃƒŠ»ŃŃ†Šøю, Š“Š»Ń Š¾ŠæрŠµŠ“ŠµŠ»ŠµŠ½Šøя Š±Š»Š¾ŠŗŠ¾Š²
26th Oct 2016, 10:35 PM
Alexey Savin
Alexey Savin - avatar
0
x = 0; while (x < 20): print(x) x = x+5
13th Apr 2023, 6:05 PM
Bienvenido V. Maceda Jr
Bienvenido V. Maceda Jr - avatar