def factorial(x): if (x==1): return 1 else: return(x*factorial (x-1)) num=5 print ("the factorial of","num","is", factorial(num))
To embed this project on your website, copy the following code and paste it into your website's HTML: