diff --git a/challenges/7.1.Loops/lesson.md b/challenges/7.1.Loops/lesson.md index d80d890..faaa011 100644 --- a/challenges/7.1.Loops/lesson.md +++ b/challenges/7.1.Loops/lesson.md @@ -36,3 +36,27 @@ else: **_Instructions_** **Modify the count, so that condition and switch_loop must become true.** **Use else statement, to mark the end of a program and switch switch_end to value true.** +## Loops (For) +- https://docs.python.org/3/tutorial/controlflow.html + + +The syntax of a for loop is: +suppose you want to print 5 numbers from 0 to 5 then code is here +``` +for i in range(6): + print(i) +``` +range can have 3 arguments range(starting value,ending value,increment) +if we specify range(0,5,1) +then it will go from 0 to 5-1 +it will print 0 1 2 3 4 +if there is increment of 2 +then 0 2 4 +``` +for i in range(i,r,e): + print(i) +``` + +**_Instructions_** +**Modify the values of i,r,e so that it print first 5 multiples of 5** +