0
While trying to create fabianski sequence..the second one aint working..can't find out y..😕😕
4 ответов
+ 2
It's because of lines 20-21. Do it like this:
c,d = d,c+d
+ 1
In your code, "d = c+d" uses "c = d" (because it's executed first), so line 21 is basically doing " d = d + d".
If you put it all in one line, the RHS is evaluated first (using the old values for "c" and "d") and then gets assigned to the LHS.
+ 1
Cleared..thnks for the explanation Diego 😄
0
What's the difference Diego ..?