mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 11:37:36 +08:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user