
Trevor S. answered 04/11/22
Python/Java/Automation/Tutor for all ages
# 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")