import math   #math module
      # take input
      num = 5
      # find factorial of a number and display result
      print('The factorial of',num,'is', math.factorial(num))
      

      Python language logo
      Factorial

      beginner
      mathematics

      To find the factorial of a given number : factorial of 5 = 5 x 4 x 3 x 2 x 1= 120

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.