Section 2. Chapter 8
single
Challenge: Sum of Squares of Even Numbers
Swipe to show menu
Task
Swipe to start coding
Write a function that takes a list of numbers and returns the sum of the squares of all even numbers using map, filter, and lambda.
- Filter the input list to keep only even numbers.
- Use
mapandlambdato square the filtered numbers. - Return the sum of the squared even numbers.
Solution
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 8
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat