Skip to content

Commit 3ec0aa8

Browse files
Update kinetic_energy.py (TheAlgorithms#7848)
Fixed a typo error in docstrings
1 parent 1550731 commit 3ec0aa8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

physics/kinetic_energy.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
Find the kinetic energy of an object, given its mass and velocity.
33
44
Description : In physics, the kinetic energy of an object is the energy that it
5-
possesses due to its motion. It is defined as the work needed to accelerate a body of a
6-
given mass from rest to its stated velocity. Having gained this energy during its
7-
acceleration, the body maintains this kinetic energy unless its speed changes. The same
5+
possesses due to its motion.It is defined as the work needed to accelerate a body of a
6+
given mass from rest to its stated velocity.Having gained this energy during its
7+
acceleration, the body maintains this kinetic energy unless its speed changes.The same
88
amount of work is done by the body when decelerating from its current speed to a state
9-
of rest. Formally, a kinetic energy is any term in a system's Lagrangian which includes
9+
of rest.Formally, a kinetic energy is any term in a system's Lagrangian which includes
1010
a derivative with respect to time.
1111
1212
In classical mechanics, the kinetic energy of a non-rotating object of mass m traveling
13-
at a speed v is ½mv². In relativistic mechanics, this is a good approximation only when
14-
v is much less than the speed of light. The standard unit of kinetic energy is the
13+
at a speed v is ½mv².In relativistic mechanics, this is a good approximation only when
14+
v is much less than the speed of light.The standard unit of kinetic energy is the
1515
joule, while the English unit of kinetic energy is the foot-pound.
1616
1717
Reference : https://en.m.wikipedia.org/wiki/Kinetic_energy
@@ -20,7 +20,7 @@
2020

2121
def kinetic_energy(mass: float, velocity: float) -> float:
2222
"""
23-
Calculate kinetick energy.
23+
Calculate kinetic energy.
2424
2525
The kinetic energy of a non-rotating object of mass m traveling at a speed v is ½mv²
2626

0 commit comments

Comments
 (0)