Solution Review: Sum of Squares of Even Numbers

This lesson gives a detailed review of how to generate sum for a list of squares of even numbers using a list comprehension.

Solution: List Comprehension With Predicate

The solution is similar to what we’ve implemented in most of our previous challenges.

  • Use a list comprehension that iterates over the range of even numbers and squares each element to obtain a list of even squares
  • Use the sum(list) to calculate the sum of even squares

Get hands-on with 1200+ tech skills courses.