RECURSION (RECURSIVE FUNCTION) Get link Facebook X Pinterest Email Other Apps June 22, 2021 TASK: To display the factorial of a number entered by the user.CODE:def factorial(n): if n==1: return 1 else: return n*factorial(n-1)num=int(input())print(factorial(num))LOGIC: Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment