0
what is difference between
i=1 while i<=4 j=1 k=i=m while j<=k print(m) m=m+1 j=j+1 print i=i+1 and i=1 while i<=4 j=1 k=i while j<=k print(m) k=k+1 j=j+1 print i=i+1
2 Answers
+ 1
You should avoid to use such assignments 'k=i=m'. And 'm' is not defined. The first example needs a value for 'm' to work.
In the second example your inner loop is infinite.
+ 2
Your first loop has more errors. M isn't defined. your missing : in 4 places. Your loops are infinite.