+ 1
Loops question
tj=55 while tj>=0: print("tj") tj=tj-1 Output is tj 56 times After that print(tj) Output is -1 why â
1 Answer
+ 2
replace the tj>=0 with tj>0 to se if it outputs 0 instead of -1
its outpiting -1 because since its set to stop when it hits 0, when it hits 0 it, it runs once more setting it to -1.