From 70227b70364bcd1b3c8d99ee018bb9af327a48f8 Mon Sep 17 00:00:00 2001 From: jamieb10 <42678724+jamieb10@users.noreply.github.com> Date: Tue, 23 Oct 2018 00:43:46 +0530 Subject: [PATCH] factorial.py this code is more simple --- factorial.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 factorial.py diff --git a/factorial.py b/factorial.py new file mode 100644 index 0000000..f7352c1 --- /dev/null +++ b/factorial.py @@ -0,0 +1,8 @@ +n=int(input("enter the limit")) +x=1 +factorial=1 +while x<=n: + factorial=factorial*x + x=x+1 +print(factorial) +