0
Can you help me with this question ?
x=2 for i in range (x); x+=1 Print (x) *Why the answer is 4 ?
2 Antworten
+ 2
for i in range(x) - runs x times (2)
It adds 2 to x two times. Primitive values are passed by value, so this doesn't cause an infinite loop if that's what you thought