easy +10 pts

Circle Circumference Calculator

Write a function that returns the circumference of a circle given its radius.

Write a function `circle_circumference(radius)` that takes a non-negative number `radius` (float or int) and returns the circumference of a circle with that radius. Use the formula: `circumference = 2 * pi * radius`. You may use `math.pi` from the standard library. The returned value should be a float. For example, `circle_circumference(1)` should return approximately `6.283185307179586`.

Constraints

The input `radius` is a non-negative number (int or float). The function must return a float. The result should be accurate to at least 10 decimal places.

Example

```python
>>> circle_circumference(1)
6.283185307179586
>>> circle_circumference(0)
0.0
>>> circle_circumference(2.5)
15.707963267948966
```
10 points ~10 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Import the math module to get pi.
Use the formula: twice the product of pi and radius.
Ensure the result is a float, even if radius is an integer.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.