easy +5 pts

Volume of Cube

Compute the volume of a cube from its side length.

Write a function `cube_volume(side)` that takes a number `side` (int or float) representing the length of a side of a cube and returns the volume of the cube. The volume is calculated as `side ** 3`. The input will always be a non-negative number. Return the volume as a number (int or float).

Constraints

- `side` is a non-negative integer or float. - The function should return a number (int or float) representing the volume.

Example

```python
>>> cube_volume(3)
27
>>> cube_volume(1.5)
3.375
>>> cube_volume(0)
0
```
5 points ~5 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Multiply the side by itself three times.
You can use the exponent operator `**`.
The result of `side ** 3` automatically works for both ints and floats.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.