+ 1
x,y,z = 0,1,0 This is defining these variables in order, with x being 0, y being 1, and z being 0. i = 1000 This is setting the i variable to 1000. while y<i: Everything after the colon is going to run as long as y is less than i. z=x+y z is equal to the sum of x+y x=y Setting x equal to y y=z Setting y equal to z (which will eventually break the loop) print (y) Prints the value of y Hope this helps. If I made a mistake or if something's unclear, please let me know.
7th Nov 2016, 7:22 PM
Lux
Lux - avatar