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.
Opgave
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
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 6
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 2.7
Challenge
Stryg for at vise menuen
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.
Opgave
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
Var alt klart?
Tak for dine kommentarer!
Awesome!
Completion rate improved to 2.7Sektion 4. Kapitel 6
single