GRACE COE-CSE-GE3171-Problem Solving and Python Programming Laboratory-Ex6a



GRACE COE-CSE-GE3171-Problem Solving and Python Programming Laboratory-Ex6a- Implementing Factorial of a given number programs using Functions

This video shows how to write a python program to implement Factorial of a given number programs using Functions
PROGRAM:
def factorial(n):
return 1 if(n==1 or n==0) else n *factorial(n – 1);
num = 5;
print(“Factorial of”,num,”is”,
factorial(num))

source

Leave a Reply

Your email address will not be published.