Skip to content

Einstein's Energy-Mass Equivalence #9191 #9220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
25 changes: 25 additions & 0 deletions physics/Einstein's Energy-Mass Equivalence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Title : Calculate Einstein's Energy-Mass Equivalence

Description :
The below mentioned code gives Einstein's mass-energy equivalence, expressed by the famous equation E=mc^2
states that energy (E) and mass (m) are interchangeable.
It means that a certain amount of mass can be converted into an equivalent amount of energy, and vice versa, under the right conditions.
This concept revolutionized our understanding of the fundamental relationship between matter and energy in the universe.

"""
def energy_equivalence(mass):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide return type hint for the function: energy_equivalence. If the function does not return a value, please provide the type hint as: def function() -> None:

As there is no test file in this pull request nor any test function or class in the file physics/Einstein's Energy-Mass Equivalence.py, please provide doctest for the function energy_equivalence

Please provide type hint for the parameter: mass

"""
The most famous equation in the world, E=mc2, arrived rather quietly.
In 1905, Einstein published two articles on the Special Theory of Relativity

E=Energy units:joule
M=mass units:kilograms
c=speed of light units:meter per second


"""
c=299792458

E=mass*c**2
return E