+ 2

Can someone explain the step of this code and how does it work?

x = 2 for i in range(x): for j in range(x): a = x – j + i print(a)

5th Feb 2019, 10:26 AM
Iskandar Nabiev
Iskandar Nabiev - avatar
1 Antwort
+ 1
i = 0 j = 0 a = x - j + i = 2 >>>2 j = 1 a = x - j + i = 1 >>>1 i = 1 j = 0 a = x - j + i = 3 >>>3 j = 1 a = x - j + i = 2 >>>2
9th Feb 2019, 6:00 AM
Vladimir {Tomsk}
Vladimir  {Tomsk} - avatar