Trevor S. answered 04/11/22
Software Engineer
# Python
mass = float(input("Enter the mass of object(in grams): "))
# Speed of light
c = 3 * 10 ** 8
# calculating the energy
Energy = mass * c ** 2
print("The energy produced is ", Energy, "ergs")
Yishhiee E.
asked 10/19/21
According to Einstein’s famous equation, the
amount of energy E produced when an amount
of mass m is completely converted to energy if
given by the formula
E = mc2
where c is the speed of light.
Write a program that will read in a mass in
grams and output the amount of energy
produced when the mass is converted to
energy. The speed of light is approximately
2.997925 x 1010 cm / sec
If the mass is given in grams, then the formula
yields the energy expressed in ergs. Use a
constant declaration to name the speed of light.
Trevor S. answered 04/11/22
Software Engineer
# Python
mass = float(input("Enter the mass of object(in grams): "))
# Speed of light
c = 3 * 10 ** 8
# calculating the energy
Energy = mass * c ** 2
print("The energy produced is ", Energy, "ergs")
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.