Nitin P. answered 06/26/20
Machine Learning Engineer - UC Berkeley CS+Math Grad
7/2 = 3 (floor division), so for iterations 1 and 2, the variable ans is decremented, resulting in a value of -2. For iterations 3 through 6, ans is incremented, resulting in a value of -2 + 4 = 2.
Mulugeta E.
Corrections: for iterations 1 and 2 the ans variable will be decremented to -3. Then for the following iterations: Iteration 3: ans = -3 + 3 = 0 Iteration 4: ans = 0 + 4 = 4 Iteration 5: ans = 4 + 5 = 9 Iteration 4: ans = 9 + 6 = 1506/28/20