+ 6
x=0 i=0 while i<4: x+=i i+=1 print (x)
When I run this code in python. The output show 6 as I tell to print (x) .Will anyone tell me in details that why this code print 6 .
4 Answers
+ 5
x => 0+1+2+3
+ 4
Thanks
+ 3
X=0+1+2+3=6
+ 1
Hope it's clear..
You're welcome