0

Why it is wrong and how can i make this work

I am doing an loop where numbers appear in sequence (like 1, 2, 3...), but for some reason i don't understand it isn't working, it shows just 1. How can i fix it? https://code.sololearn.com/cSB7U7H51m9f/?ref=app

9th Oct 2019, 11:26 PM
Felipe Sucupira
Felipe Sucupira - avatar
1 Odpowiedź
+ 4
You re-initialzed number to equal 1 in the loop. Define number before the loop.
9th Oct 2019, 11:33 PM
Odyel
Odyel - avatar