+ 1

nums = (55, 44, 33, 22) print(max(min(nums[:2]), abs(-42)))

What is the output? the output is 44. How it comes 44? Can anyone explain it to me?

9th May 2017, 4:43 AM
AJITH KUMAR
AJITH KUMAR - avatar
15 ответов
+ 11
44
5th May 2018, 7:30 AM
Ashivudhi Erro Remainder
Ashivudhi Erro Remainder - avatar
+ 9
Trace backwards from the inner parentheses: nums[:2] is (55, 44) min(nums[:2]) is min((55, 44)), which is... abs(-42) is 42 max(x, y) returns the greatest between x and y ...
9th May 2017, 5:19 AM
Álvaro
+ 5
Here, you have to be very carefull!!! Because of parenthesis and then you can easily do it. nums = (55, 44, 33, 22) print(max(min(nums[:2]),abs(-42))) print(max(min(55,44),abs(-42))) print(max(44,42)) print(44) Hence Output : - 44
1st Mar 2021, 12:56 AM
Bishwanath Kumar
Bishwanath Kumar - avatar
+ 5
The answer is 44 not 30, they're lying
28th Dec 2021, 6:19 PM
Thuwayba Ahmed
Thuwayba Ahmed - avatar
+ 5
nums = (55, 44, 33, 22) print(max(min(nums[:2]), abs(-42))) Solution 1. nums[:2] means numbers between num[0]-num[2]= {55,44} 2. min(nums[:2]) = min(55, 44) = 44 3. abs(-42) =absolute value of (-42) = 42 4. max(min(nums[:2]), abs(-42)) = max(44, 42) = 44 5. print(44) hence the final answer is 44
10th Sep 2022, 10:16 AM
Ermiyas Yeshambel Belay
Ermiyas Yeshambel Belay - avatar
+ 2
ok this solo llearn cool app but DAMN this question have too much math in it
3rd Dec 2019, 8:06 AM
Malka Ru
Malka Ru - avatar
+ 1
44
20th Nov 2019, 4:05 PM
Roberto Salazar-Abrego Jr.
Roberto Salazar-Abrego Jr. - avatar
+ 1
answer is 44
9th Jul 2020, 5:22 PM
Ryan Wilke
Ryan Wilke - avatar
+ 1
44
27th Dec 2020, 9:48 AM
Tushar Kale
Tushar Kale - avatar
0
How to inteprete abs(-42)?
23rd Jul 2021, 9:47 AM
KOW WAI NA
KOW WAI NA - avatar
0
The abs() function returns the absolute value of the given number. so the answer is 44
14th Jun 2022, 6:55 AM
Ravishka Wijerathne
Ravishka Wijerathne - avatar
0
44
16th Aug 2022, 12:04 PM
wessam lahmod nados
0
nums = (55, 44, 33, 22) print(max(min(nums[:2]), abs(-42))) #nums[:2]> (55,44) # min(nums[:2]) > min(55,44)>44 # abs(-42)>42 # (max(min(nums[:2]), abs(-42))> max(44,42)>44 Output >>44
13th Mar 2023, 10:06 AM
Aye Mon Kyaw
Aye Mon Kyaw - avatar
- 1
30
16th Sep 2019, 5:20 AM
Ramyashri
Ramyashri - avatar
- 6
ans is 30
31st May 2019, 11:08 AM
sweatha sundharam
sweatha sundharam - avatar