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.
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 4. Kapitel 6
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Suggested prompts:
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 2.7
Challenge
Svep för att visa menyn
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.
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Awesome!
Completion rate improved to 2.7Avsnitt 4. Kapitel 6
single