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

Try your Solution

Strongly recommended to Solve it on your own, Don't directly go to the solution given below.

#write your code here

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

Comments