repeating variable? insight for noob | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

repeating variable? insight for noob

#expecting infinite output of condition, but terminal provides no output? number = 15 while number <= 1: print(number)

22nd Apr 2017, 10:20 AM
Sasha Vaseghi
Sasha Vaseghi - avatar
2 Respostas
+ 2
15 <= 1 is always false. There is no iteration of the while loop.
22nd Apr 2017, 10:28 AM
Ohjel
Ohjel - avatar
+ 1
#Facepalm... <= 1......
22nd Apr 2017, 10:20 AM
Sasha Vaseghi
Sasha Vaseghi - avatar