Challenge
Previously you solved the problem of calculating the circle area in Python for particular radius. Let's implement the function that will receive one parameter (radius) and print the circle area.
Oppgave
Swipe to start coding
- Define function
circle_area
with one parameterR
. - Within the function body calculate a circle area using
math.pi
andR
(multiply π by the square of the radius), and assign the result to theS
variable.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 6
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
Suggested prompts:
Oppsummer dette kapittelet
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 2.7
Challenge
Sveip for å vise menyen
Previously you solved the problem of calculating the circle area in Python for particular radius. Let's implement the function that will receive one parameter (radius) and print the circle area.
Oppgave
Swipe to start coding
- Define function
circle_area
with one parameterR
. - Within the function body calculate a circle area using
math.pi
andR
(multiply π by the square of the radius), and assign the result to theS
variable.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Awesome!
Completion rate improved to 2.7Seksjon 4. Kapittel 6
single