From 92f7ff8dcc44bb533cb48b503de7c67d34ea7125 Mon Sep 17 00:00:00 2001 From: Mamadou Mahadiou Ba Date: Mon, 17 Feb 2025 11:39:17 -0500 Subject: [PATCH] my solution with lambda fonction --- Status/Day 2.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Status/Day 2.md b/Status/Day 2.md index 37aaf66..67be02f 100644 --- a/Status/Day 2.md +++ b/Status/Day 2.md @@ -217,6 +217,8 @@ D = input().split(',') D = list(map(calc,D)) # applying calc function on D and storing as a list print(",".join(D)) ``` + + --- ```python '''Solution by: parian5 @@ -241,6 +243,19 @@ for D in my_list: print(','.join(map(str, x))) ``` +--- +```python +'''Solution by: mouhazba +''' +from math import sqrt +C = 50 +H = 30 +x = input('Type : => ').split(',') +rsp = list(map(lambda D: str(round(sqrt(2*C*int(D)/H))), x)) + +print(','.join(rsp)) +``` + --- # Question 7