From c59ff208fc7bf30d54966201cfccdcf075386d48 Mon Sep 17 00:00:00 2001 From: ussamaawan <91910265+ussamaawan@users.noreply.github.com> Date: Sun, 18 Sep 2022 21:24:10 +0500 Subject: [PATCH] Update and rename solution.py to Question 1 Factorization solution.py --- Q1/Question 1 Factorization solution.py | 12 ++++++++++++ Q1/solution.py | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Q1/Question 1 Factorization solution.py delete mode 100644 Q1/solution.py diff --git a/Q1/Question 1 Factorization solution.py b/Q1/Question 1 Factorization solution.py new file mode 100644 index 0000000..9392196 --- /dev/null +++ b/Q1/Question 1 Factorization solution.py @@ -0,0 +1,12 @@ +#First we need to define varriable and then using for loop we will calulate factors . +fact= 1 +var =100 +for i in range (1,var): + fact =fact*i + #Now we need summation of factorizarition value + sum = 0 + temp = fact + while (temp): + sum =sum + (temp % 10) + temp =int (temp/10) + #This will provide us our answer diff --git a/Q1/solution.py b/Q1/solution.py deleted file mode 100644 index 4429a19..0000000 --- a/Q1/solution.py +++ /dev/null @@ -1 +0,0 @@ -## Add code below with answer clearly stated