0
Why is this the output?
i = 0 x = 0 while i < 4: x+=i i+=1 print(x) why is the output 6 for this code?
1 Resposta
+ 4
Cause 0 + 1 + 2 + 3 is 6
Print both variables in the for loop to see why for yourself
i = 0 x = 0 while i < 4: x+=i i+=1 print(x) why is the output 6 for this code?