How to do python program for find factorial of a number

preview_player
Показать описание
def recur_factorial(n):
if n==1:
return n
else:
return n*recur_factorial(n-1)
num=int(input("Enter a number:"))
if num =0:
print("SORRY,The factorial number doesn't exist for negative number..")
elif num==0:
print("The factorial number for 0 is 1")
else:
print("The factorial number for",num,"is",recur_factorial(num))

In this description angle bracket is not given(if num lesser than or equal to 0)
Рекомендации по теме
Комментарии
Автор

At least font to larger size ka rakha. Karo

anshuman