Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Sum of Squares of Even Numbers | Higher-Order Functions and Lambdas
Functional Programming Concepts in Python
Osio 2. Luku 8
single

single

Challenge: Sum of Squares of Even Numbers

Pyyhkäise näyttääksesi valikon

Tehtävä

Pyyhkäise aloittaaksesi koodauksen

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 map and lambda to square the filtered numbers.
  • Return the sum of the squared even numbers.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 8
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

some-alt