Watch the video to learn factorial program in Python.
# Python script to print the factorial of any non-negative integer.
# 5! = 5*4*3*2*1 = 120
# n! = n (n-1)(n-2)(n-3)....1 =
#Function to find factorial starts here
return 1 if(n==1 or n==0) else n * factorial(n-1)
#function to find factorial ends here
#Take input from user
x = input("Please Enter the number, Whose factorial you want to find : ")
#convert user input from string to integer
x = int(x)
# You can use the below to know the data type of variable
# Print the factorial of the entered number
print("The factorial of ",x," is = ",factorial(x))
python script to find factorial of any number,python programs for beginners in hindi,python programs tutorial in hindi,factorial program in python,factorial in python,recursion in python,python script,factorial program in python in hindi,programming tutorials,python factorial program,single line factorial,factorial program,python tutorial,web designing,python shell,python 3.7.0,python 3.8 tutorial for beginners,python 3.8 programming
My Self Subrat Dash. I have completed my MSc in Information Technology. Since last 12 years i am teaching Math and Computer at TTRC Computer Institute situated at Rayagada, Odisha, India.
I believe in conceptual learning, so i explain each and every concept with demos and examples, which makes it easier to understand.