Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
oorrja
GitHub Repository: oorrja/learntosolveit
Path: blob/master/source/python/algorithm_fact2.rst
1241 views
=========================
Factorial of a number - 2
=========================

Question
--------

Find the factorial (n!) of a number n.

Solution
--------

.. literalinclude:: ../../languages/python/algorithm_fact2.py
   :language: python
   :tab-width: 4

.. runcode:: ../../languages/python/algorithm_fact2.py
   :language: python
   :codesite: ideone

Explanation
===========





.. seealso::

   * :python-suggest-improve:`algorithm_fact2.py`
   * :python-better-explain:`algorithm_fact2.rst`