diff --git a/Q1/solution.py b/Q1/solution.py index 4429a19..df145d3 100644 --- a/Q1/solution.py +++ b/Q1/solution.py @@ -1 +1,15 @@ -## Add code below with answer clearly stated +n = 100 +fact = 1 + +for i in range(1, n+1): + fact = fact * i + +# Convert number to string +text_fact = str(fact) + +# Initialize empty list for every letter of factorial string +summ = [] + +for letter in text_fact: + summ.append(int(letter)) +print(sum(summ))