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

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,1
while(i<n):
    print(j,end=" ")
    j=j+2
    i=i+1


			
				
			

Program Explanation

while(i

Comments