Format docs (#7821)

* Reformat docs for odd_even_sort.py

* Fix docstring formatting

* Apply suggestions from code review

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
This commit is contained in:
Andrey
2022-10-29 09:26:19 +03:00
committed by GitHub
parent 762afc086f
commit cf08d9f5e7
4 changed files with 24 additions and 9 deletions

View File

@ -1,5 +1,6 @@
"""
Find the kinetic energy of an object, give its mass and velocity
Find the kinetic energy of an object, given its mass and velocity.
Description : In physics, the kinetic energy of an object is the energy that it
possesses due to its motion. It is defined as the work needed to accelerate a body of a
given mass from rest to its stated velocity. Having gained this energy during its
@ -19,6 +20,8 @@ Reference : https://en.m.wikipedia.org/wiki/Kinetic_energy
def kinetic_energy(mass: float, velocity: float) -> float:
"""
Calculate kinetick energy.
The kinetic energy of a non-rotating object of mass m traveling at a speed v is ½mv²
>>> kinetic_energy(10,10)