Circle with indications for radius, diameter, circumference and area

We want to calculate the circumference and area of a circle given its radius.

To create the program, we need to do a couple of things:

  1. Prompt user for a radius of the circle.
  2. Apply the circumference and area formula.
  3. Print out the results.

Input

A natural number (\(\mathbb{N}\)).

Output

A line of text that defines the circumference and area.

The circumference is {circumference} and the area is {area}

Example

What is the circumference and area of a circle of radius 2? The input is marked in bold.

Enter the radius of your circle: 2
The circumference is 12.566370614359172 and the area is 12.566370614359172

Formulas

The relevant mathematical formulas are:
\(\textrm{circumference} = 2 * \textrm{radius} * \pi\)
\(\textrm{area} = \textrm{radius}^2 * \pi\)

Read number in Python

To read a number into Python, use the input() function. That function will read in the user input and save it as text. You can then use the int() function to convert the text from earlier into an integer.