Please answer it in Python Write a function somme_even that takes a list as an argument and returns the sum of the even numbers contained in the list. Example: somme_even([4, 7, 12, 0, 21, 5]) return...



Please answer it in Python



  • Write a function somme_even that takes a list as an argument and returns the sum of the even numbers contained in the list.



Example:
somme_even([4, 7, 12, 0, 21, 5]) return => 16 (because 16=4+12+0).



  • Write a function nb_elem_even that takes a list as an argument and returns the number of even integers contained in the list.



Example:
nb_elem_even([4, 7, 12, 0, 21, 5]) return => 3 (because 4, 12, and 0 are even).



  • Write a function max_pair that takes a list as an argument and returns the largest even integer contained in the list. It will be assumed for simplicity (in this question only) that the list always contains at least one even number.



Example:
max_even([4, 7, 12, 0, 21, 5]) return => 12.



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here