0
How would I use a nested for loop to have this output?
1 2 4 8 2 4 8 16 4 8 16 32 8 16 32 64 for i in range(4): for j in range(1,4): print(??, end=\t) print()
4 Antworten
+ 1
Solution:
for i in range(0, 4):
for j in range(i, i+4):
print(2**j, end=' ')
print()
+ 1
Where is your attempt?
0
for i in range(4):
for j in range(1,4):
print(??, end=\t)
print()
That's what I have so far
0
Thanks!