Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge | Functions and Modules
Introduction to Data Analysis in Python

bookChallenge

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

  1. Define function circle_area with one parameter R.
  2. Within the function body calculate a circle area using math.pi and R (multiply π by the square of the radius), and assign the result to the S variable.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 4. Kapitel 6
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

Awesome!

Completion rate improved to 2.7

bookChallenge

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

  1. Define function circle_area with one parameter R.
  2. Within the function body calculate a circle area using math.pi and R (multiply π by the square of the radius), and assign the result to the S variable.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

close

Awesome!

Completion rate improved to 2.7
Sektion 4. Kapitel 6
single

single

some-alt