There was an error while loading. Please reload this page.
1 parent f716ba7 commit 49c6ab7Copy full SHA for 49c6ab7
Status/Day 4.md
@@ -169,6 +169,16 @@ x = input('please enter a digit:')
169
reduce(lambda x, y: int(x) + int(y), [x*i for i in range(1,5)])
170
```
171
---
172
+```python
173
+'''Solution by: lcastrooliveira
174
+'''
175
+def question_15(string_digit):
176
+ return sum(int(string_digit * n) for n in range(1, 5))
177
+
178
+inp = input()
179
+print(question_15(inp))
180
+```
181
+---
182
183
[**_go to previous day_**](https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/blob/master/Status/Day%203.md "Day 3")
184
0 commit comments