Python Program to Print Even Numbers from 1 to N - In Hindi

preview_player
Показать описание
Python Program to Print Even Numbers from 1 to N - In Hindi - Tutorial#18

In this video, I have explained a program with while loop to print even numbers among first n natural numbers in python. This is a basic program to print only even numbers from 1 to N using while loop. While loop is the basic looping system in Python Programming. Natural Numbers start with 1 and it goes upto N. We have to print all the even numbers from 1 to a N (given by the user).

Looping/While statement is used to execute a single statement or a block of statement n times till the condition is true. Every loop must contain three parts:

1. Initialization of counter variable.
2. Condition
3. Increment/Decrement of counter variable

While loop or any loop will work fine if all the three parts are there in the programs. If any one is missing the loop will not run properly.

Tags Used:

python,programming
python tutorial
python in hindi
python for beginners
programming fundamentals
program to print even numbers from 1 to n
python loops tutorial,while loop in python
python looping program
python program even or odd
first 10 even numbers
print even and odd numbers from 1-10 using while loop
print even and odd number using while loop
print the even number using while loop
Python Program to Print Even Numbers from 1 to N - In Hindi

#codeitup
#whileloop
#python
Рекомендации по теме
Комментарии
Автор

Thank you so much sir
It is really beneficial for python beginners ..

wvfkdwn
Автор

Wow great sir. Now getting all the programs. Pls upload more videos.

BABLISINGH-wfdw
Автор

Sir I got the topic
Your explanation is quite good.

prernatripathi
Автор

Zabardast GuruJi. Dhanya Ho.
Amazing Explanation With Excellent Editing And Practical Examples. 👍♥️

Anonymous-wmie
Автор

Thanks for such a simple explanation. That's how i solved it:
n = int(input("Enter a value: \n"))
i = 1
while n >= i:
if i % 2 == 0:
print(i)
i = i + 1

Cryptopunq
Автор

you are explaining in a very better way than other thank you for creating a such great video tutorials it helps to the beginners who want to learn python...i am started to watch all your videos. thanks again..

Nanashinde
Автор

Sir aap hamare liye precious god gift hain
Thank you very much sir ji

abhimangaur
Автор

x=int(input("enter the number"))
for i in range (2, x, 2):
print(i)

sundaram
Автор

Thanks sir your all python tutorial lactures are very helpful for prepare python for summer industrial training..
It's really helpful....for training....again thank you so much
.

abc
Автор

sir, in python programming after input i want to use clear screen command before output print. So please write the script for clear the screen, .

lachuparu
Автор

Sir very nice explanation... U are helping very much for my preparation..

ashishsrivastava
Автор

We have to print no. between 1 to n
We will take "n" also while displaying the result???
or we have to give n-1

SandeepSingh-royr