diff --git a/loops_nested_loop.py b/loops_nested_loop.py index 8f18254..df015bd 100644 --- a/loops_nested_loop.py +++ b/loops_nested_loop.py @@ -1,16 +1,16 @@ - +#main function starts def main(): i=0 - while(i<5): + while(i<5): #outer while loop print("i={}".format(i)) - i+=1 + i+=1 #increment value of i by 1 i.e i = i+1 j=5 - while(j>i): - print("j={}".format(j)) - j-=1 + while(j>i): #inner while loop + print("j={}".format(j)) #format() funtion used for format the string in python + j-=1 #decrementing value of j by 1 i.e j=j-1