Header Ads Widget

Write a Python program that print first 10 odd numbers using loop

Write a Python program that print first 10 odd numbers using loop

Given a number , write a program to find the factorial of a given numbers .

Sample output:

1 3 5 7 9 11 13 15 17 19 

 Write a Python program to calculate the factorial of a number using loop

The objective of the code is to find the factorial of  number. Value of n is given by user .

 Code(Python):-

n=int(input("First 10 Odd numbers are \n"))
for i in range(1,20):
if i%2!=0:
print(i,end=" ")

Output:-

First 10 Odd numbers are
1 3 5 7 9 11 13 15 17 19



Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-