Skip to content

Commit

Permalink
Update Day 4.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darkprinx authored Jun 8, 2020
1 parent f716ba7 commit 49c6ab7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Status/Day 4.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ x = input('please enter a digit:')
reduce(lambda x, y: int(x) + int(y), [x*i for i in range(1,5)])
```
---
```python
'''Solution by: lcastrooliveira
'''
def question_15(string_digit):
return sum(int(string_digit * n) for n in range(1, 5))

inp = input()
print(question_15(inp))
```
---

[**_go to previous day_**](https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/blob/master/Status/Day%203.md "Day 3")

Expand Down

0 comments on commit 49c6ab7

Please sign in to comment.