Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

N ODD numbers in python

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

Sample Input 1:

7

Sample Output 1:

1 3 5 7 9 11 13

Program or Solution

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


					    
					

Program Explanation

while(i