Friday 11 February 2022

Python practice programs for beginners - Day 15

 

Python practice programs for beginners - Day 15


Day 14 Solution:


Output:

Day 15 : for loop

If you see in the above picture the output is starting from 0 and ending with 9. If we want to start from 1 to 10 then we need to change the code in the range.


In this we have to use from 1 to 11 (10+1) because the loop runs from 1 to whatever the value mentioned at end position -1.

Output:

Day 15 Task: 

Get start value and end value from the user at run time and print all the even numbers between that range.


1 comment :