In this program, we will find the multiplication of natural numbers using Python.
Steps to solve the program
- Create a count variable and assign its value equal to 1.
- Create a product variable and assign its value equal to 1.
- While the value of the count variable is less than 11 multiply the product variable by the count variable.
- Add 1 to the count variable after each iteration.
- Print the output.
count = 1
product = 1
while count<11:
product *= count
count += 1
print("Total: ",product)
Output :
Total: 3628800