def factorial(n):
          if (n==1 or n==0):
              return 1
          else:
              return (n*factorial(n-1))
      n = int(input("Enter number: "))
      print("The factorial of ",n," is: ",factorial(n))
      
      Python language logo

      Factorial

      Find the factorial of a given number

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.