Python Practice › Loop Programs › Program 72
Product of the first 10 numbers
Write a Python program to find the product of the first 10 natural numbers.
Output
3628800
Approach
- Start at 1 and multiply by each number.
Solution
product = 1for n in range(1, 11): product *= nprint(product)Output
3628800
Note
This is 10! (10 factorial).
Learn the concept
New to this topic? Read the lesson, then come back.