Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

PYTHON PRACTICAL

NOTES
(for loop) part 3 uwu

For Loop - FOR LOOP VIDEO TO


UNDERSTAND THE NOTES (0:00 –
11:30 ONLY) (CLICK CROW GAWAARO)

WAP using for loop to print your


school’s name five times.
For and in are keywords
x is variable
it is printed 5 times by putting the
range as 5 as the loop works from 0 to
5.

WAP using for loop to print each


alphabet of the text “hello world” in
separate lines.
WAP using for loop to print the natural
numbers from 10 to 1 in reverse order.
We have to put -1 because python
takes +1 as default increment. We have
to change this default increment. So, it
goes from 10 to 1, each reducing 1(-1).

WAP using for loop to print the first 10


even number.
The default increment is changed from
+1 to +2 for printing even numbers.

You might also like