Don't use Python built-in string and list methods such as replace(). reverse(), etc. o Write a function called average(list) that takes a list as a parameter and returns the average. - Use list = [24,...


Don't use Python built-in string and list methods such as replace().<br>reverse(), etc.<br>o Write a function called average(list) that takes a list as a parameter and<br>returns the average.<br>- Use list = [24, -38, -23, 63, -41, 4, 73, -31, -12, 45, 12, 39, 3, 89,<br>48, 57, -40, 84, -6, -22]<br>- After the function definition, call the following statements:<br>- print(average(list))<br>o Write a function, sum_all_evens(list) that sums up all the even numbers<br>in a list and returns the sum.<br>- If no even numbers in the list, then return 0<br>- Use list = [24, -38, -23, 63, -41, 4, 73, -31, -12, 45, 12, 39, 3, 89,<br>48, 57, -40, 84, -6, -22]<br>- After the function definition, call the following statements:<br>!!<br>print(sum_all_evens(list))<br>

Extracted text: Don't use Python built-in string and list methods such as replace(). reverse(), etc. o Write a function called average(list) that takes a list as a parameter and returns the average. - Use list = [24, -38, -23, 63, -41, 4, 73, -31, -12, 45, 12, 39, 3, 89, 48, 57, -40, 84, -6, -22] - After the function definition, call the following statements: - print(average(list)) o Write a function, sum_all_evens(list) that sums up all the even numbers in a list and returns the sum. - If no even numbers in the list, then return 0 - Use list = [24, -38, -23, 63, -41, 4, 73, -31, -12, 45, 12, 39, 3, 89, 48, 57, -40, 84, -6, -22] - After the function definition, call the following statements: !! print(sum_all_evens(list))

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here