Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

N Even numbers in python

Python program to get input n and print n even numbers.

Sample Input 1:

7

Sample Output 1:

2 4 6 8 10 12 14

Program or Solution

					    
							
n=int(input("Enter n value:"))
i,j=0,2
while(i<n):
    print(j,end=" ")
    j=j+2
    i=i+1


					    
					

Program Explanation

while(i