Challenge: Creating Lambda Function
Oppgave
Swipe to start coding
You are given three numerical variables: a
, b
, and c
. Create a lambda function called fun
that:
- Multiplies
a
by 3, multipliesb
by 2, adds the results toc
, and then squares the final result. - Create a variable called
result
and use the lambda function to compute the final result for a given set of values fora
,b
, andc
.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 6. Kapittel 12
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 1.67
Challenge: Creating Lambda Function
Sveip for å vise menyen
Oppgave
Swipe to start coding
You are given three numerical variables: a
, b
, and c
. Create a lambda function called fun
that:
- Multiplies
a
by 3, multipliesb
by 2, adds the results toc
, and then squares the final result. - Create a variable called
result
and use the lambda function to compute the final result for a given set of values fora
,b
, andc
.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Awesome!
Completion rate improved to 1.67Seksjon 6. Kapittel 12
single