Python Program to Find Factorial of Number Using Recursion - Complete Guide

preview_player
Показать описание


WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.

We help businesses of all sizes to build their online presence, grow their business, and reach new heights.

All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.

📞 For more info about the courses, call us: +91-7878985501, +91-9269698122

✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -

Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:

--------------------------------------| Thanks |---------------------------
#python #pythontutorials #pythonprogramming
Рекомендации по теме
Комментарии
Автор

😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.

wscubetech
Автор

Factorial of 0 is 1, which is not coming with this logic.
Please check the below logic.

def fact(n):
if n == 0:
return 1
else:
return n * fact(n - 1)


n = int(input("Enter a number here: "))
if n < 0:
print("Factorial of a number less than 0 doesn't exist")
else:
print("Factorial of am given no. is ", fact(n))

abhishekdipke
Автор

Factorial of 0 = 1 .... there is a mistake

uwdsukj