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

Course Content

Introduction to Data Analysis in Python

Introduction to Data Analysis in Python

1. Basics
2. Data Types
3. Control Flow
4. Functions and Modules
5. Introduction to NumPy

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.

Task

  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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 4. Chapter 6
toggle bottom row

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.

Task

  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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 4. Chapter 6
toggle bottom row

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.

Task

  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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 4. Chapter 6
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt