menu search
brightness_auto
more_vert
2 1

The formula E = mc2 states that the equivalent energy (E) can be calculated as the mass (m) multiplied by the speed of light (c = about 3×108 m/s) squared. Write a program that accepts the mass of an object and determines its energy.

Topic Python Programming
Type Python Program
Class 11
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
 
verified
Verified Answer
2

The formula is given as E = mc2

Where E ⇒ energy is measured in Joule,

m ⇒ mass in Kilogram,

c ⇒ speed of light in m/s.


#Program to calculate the equivalent energy of an object 
#asking for the mass in grams 

mass = float(input("Enter the mass of object(in grams): "))
 
#Speed of light is known and given in the question 
c = 3 * 10 ** 8
 
#calculating the energy, mass is divided by 1000 to convert it into kilogram 
Energy = (mass/1000) * c ** 2
 
#printing the output 
print("The energy of an object with mass",mass," grams ",Energy,"Joule.")

Start Learning Python at - Python Programming Class 10

thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike

Related questions

thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 4 like thumb_down_off_alt 0 dislike
0 answers
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
0 answers
Welcome to Aiforkids, where you can ask questions and receive answers from other members of the community.

AI 2024 Class 10 Board Exams mein 100% laane ka plan OPEN NOW

Class 10 Complete One Shot AI Lectures at - Youtube
...