Write a function computing the perimeter of a circle given its radius.
First read the function tutorial.
Your function should be named
radius parameter is the radius of a cirle.
Your function should return the perimeter of a circle of the given
To test it, we will import your function and try it with different values, such as:
>>> circle_perimeter(1) 6.283185307179586 >>> circle_perimeter(10) 62.83185307179586 >>> circle_perimeter(100) 628.3185307179587
For example, here is a simple function which takes a value and give it back unmodified:
def identity(x): return x
We can call our
identity function and check it gave us back the given value:
>>> identity(42) == 42 True
>>> print(42) 42
>>> print(identity(42)) 42
are behaving the same. In the first case, we give
which gives back
42, which is directly given to
We could also compare those equivalent codes:
>>> fourty_two = 42 >>> print(fourty_two)
>>> fourty_two = identity(42) >>> print(fourty_two)
>>> fourty_two = 42 >>> fourty_two = identity(fourty_two) >>> print(fourty_two)
There's no corrections yet, hit the `Submit` button to send your code to the correction bot.