From 93ce5e3d0ed3a2e99e3ac24a1bbc998b47a2d764 Mon Sep 17 00:00:00 2001 From: mukul vashisht Date: Wed, 3 Oct 2018 00:58:58 +0530 Subject: [PATCH] add some comment to make it readable for beginner --- loops_nested_loop.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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