Join the conversation

learning for i in range(3): j=0 while j<3: print(i,j) j+=1
Reply

Assignment:
for i in range(1,4):
j = 0
while j < 3:
print(i,j)
j +=1
i+= 1
Reply

# While inside for loopfor i in range(3):
j=0
while j<3:
print(i,j)
j+=1
Reply

# while loop within for loopfor i in range(3):
j = 1
while(j<4):
print(i , j)
j+=1
Reply

for i in range(3):
j = 0
while j < 3:
print(i, j)
j += 1
Reply

all_assignment=done
Reply

for y in range(3):
x=0
while x<1:
x+=1
print(y,x)
Reply

sir I got change answer after copying your code
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
['Red', 'Green', 'Blue'] ['Books', 'Pen', 'copy']
Reply

for i in range(3):
j = 0
while j < 2:
print(i, j)
j += 1
sir my code it looks like this but it works as while loop inside for loop
Reply

# While Loop inside For Loop
i = 1
for j in range(3):
while i <= 3:
print(i, j)
i += 1# For Loop inside While Loop
i = 1
while i < 4:
for j in range(3):
print(i, j)
i += 1
Reply