Skip to content

Commit 96a3c7d

Browse files
committed
Merge pull request #157
2 parents 7cd69ee + b6f900f commit 96a3c7d

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Status/Day 1.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,26 @@ print(factorial)
187187
```
188188
---
189189

190+
```python
191+
'''Soltuion by: pstrings
192+
'''
193+
def factorial(num):
194+
if (num < 0):
195+
return "Dude provide whole numbers"
196+
if (num <= 1):
197+
return 1
198+
return (num * factorial(num - 1))
199+
200+
201+
def factorial_numbers(*args):
202+
for i in args:
203+
yield factorial(i)
204+
205+
206+
for x in factorial_numbers(5, 6, 2, 1, 8, 0, -5):
207+
print(x)
208+
```
209+
---
190210

191211
# Question 3
192212

0 commit comments

Comments
 (0)