Question: programming language is JAVA Energy of Light In physics, Planck's constant h is used to relate a photon's energy to its frequency. Planck's constant, h,

programming language is JAVAprogramming language is JAVA Energy of Light In physics, Planck's constant h

Energy of Light In physics, Planck's constant h is used to relate a photon's energy to its frequency. Planck's constant, h, is defined as 6.626 x 10-34. Planck's constant can be used to calculate a photon's energy by using the formula E = hf where fis the frequency of the photon. A photon's frequency, in turn can be calculated from its wavelength using the formula f= where is the wavelength of the photon and c is the speed of light, defined as 3 x 108. With this information, write a program that accepts the wavelength of a photon. The program should calculate its frequency and energy using the formulae provided above. Note: Use constants to store Planck's constant and the speed of light. Use e-notation to write values for the constants and for any values that are expressed in powers of ten (see sample output and section 2.8 of the zyBook for examples in syntax) Samples of the output is shown below: Output 1: Enter the wavelength of the photon (in m): 700.0e-9 The frequency of the photon is 4.2857142857142856E14 Hertz. The energy of the photon is 2.83971428571428576-19 Joules. Output 2: Enter the wavelength of the photon (in m): 525.06-9 The frequency of the photon is 5.714285714285715E14 Hertz. The energy of the photon is 3.78628571428571476-19 Joules. Note that scientific notation can be used with upper or lower case

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!