Post

Python Developer
Python Developer@PythonDvz·
Only 50% of the beginners answer this correctly 🤯 Comment your answer 👇
Python Developer tweet media
English
8
3
44
6.1K
Jimmy Fikes
Jimmy Fikes@akajim·
@PythonDvz Each loop repeats twice, so the iterations are as follows, so 0112 will print: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 2
English
0
0
0
13
Supermicro
Supermicro@Supermicro·
Building AI at Scale: SemiAnalysis’s Dylan Patel in conversation with Supermicro CBO Vik Malyala
English
14
41
512
3.2M
Charles
Charles@chucky3528211·
@PythonDvz 0112 When i=0, j=0: prints 0 + 0 = 0, so output is 0 When i=0, j=1: prints 0 + 1 = 1, so output is 1 When i=1, j=0: prints 1 + 0 = 1, so output is 1 When i=1, j=1: prints 1 + 1 = 2, so output is 2 All together, the output will be: 0112
English
0
0
2
201
yourclouddude
yourclouddude@yourclouddude·
@PythonDvz 0112 Because the nested loop runs 4 times: i=0, j=0 → 0 i=0, j=1 → 1 i=1, j=0 → 1 i=1, j=1 → 2 Since end="" is used, everything prints on the same line.
English
0
0
4
135
Paylaş