Answer to Question #299622 in Python for Sin

Question #299622

you have been an integer array A of size N.you need to pfint the number with the value closest to zero.if there are multiple elements print the number with greater value.





1
Expert's answer
2022-02-18T12:50:33-0500
a = [-5, 9, -2, 6, 4]
min = min(a, key=lambda x: abs(x))
print(min)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS