Find the multiplication of natural numbers

In this program, we will find the multiplication of natural numbers using Python.

Steps to solve the program
  1. Create a count variable and assign its value equal to 1.
  2. Create a product variable and assign its value equal to 1.
  3. While the value of the count variable is less than 11 multiply the product variable by the count variable.
  4. Add 1 to the count variable after each iteration.
  5. Print the output.
				
					count = 1
product = 1

while count<11:
    product *= count
    count += 1
    
print("Total: ",product)
				
			

Output :

				
					Total:  3628800
				
			

sum of the first 10 natural numbers using the while loop 

Print numbers from 1-10 except 5,6 using a while loop

Leave a Comment