Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

Why two -for- can rebound the variable and give this output? URL: https://www.edx.org/courses/MITx/6.00x/2012_Fall/discussion/forum/600x_l3_v3/threads/5077eff65308862b00000059

OpenStudy (anonymous):

because when you go to the first loop - python created sequence (0, 1, 2, 3). And on the next iteration doesn't check ui value. in the second loop - first time you have ui = 4 and after that - 2

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!