Skip to content

Commit a50c849

Browse files
authored
Update Day 1.md
1 parent 13eed71 commit a50c849

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Status/Day 1.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ while num:
123123
print(f'the factorial of {org} is {fact}')
124124
```
125125
---
126+
```python
127+
'''Soltuion by: KruthikaSR
128+
'''
129+
from functools import reduce
130+
131+
def fun(acc, item):
132+
return acc*item
133+
134+
num = int(input())
135+
print(reduce(fun,range(1, num+1), 1))
136+
```
137+
---
126138

127139
# Question 3
128140

0 commit comments

Comments
 (0)