Skip to content

Commit c4e5fe2

Browse files
authored
Update Day_15.md
1 parent b8f5a99 commit c4e5fe2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Status/Day_15.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,15 @@ for i in range(1, n+1):
252252
sum+= i/(i+1)
253253
print(round(sum, 2)) # rounded to 2 decimal point
254254
```
255+
---
256+
```python
257+
'''Solution by: lcastrooliveira
258+
'''
259+
def question_59(n):
260+
print(round(sum(map(lambda x: x/(x+1), range(1, n+1))), 2))
255261

262+
question_59(5)
263+
```
256264
---
257265

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

0 commit comments

Comments
 (0)