Problem 361. Energy of a photon
⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛
Given the frequency F of a photon in giga hertz.
Find energy E of this photon in giga electron volts.
Assume h, Planck's constant is about 4 femto electron-volt-second.
To maximize benefits, it may help not looking at the Test Suite before trying any solution!
Solution Stats
Problem Comments
-
10 Comments
Show
7 older comments
akihisa yorozu
on 22 Sep 2021
Photon energy calculation is well known equation to the person who learned physics. This problem using not "J" but "eV" as the unit. Take care!
GeeTwo
on 24 Dec 2022
E=hf. The test cases are just wrong.
Cinzia
on 19 Sep 2023
The test case should be updatet, it does not account for numerical differences. Also why not use a more accurate value for the Planck constant? As it is now one hase to reverse engineer the Planck constant from the test cases and then use that one. And then it even fails the test case...
Solution Comments
Show commentsGroup

Cody5:Easy
- 31 Problems
- 159 Finishers
- Energy of a photon
- Breaking Out of the Matrix
- The Top 5 Primes
- I Plead the Fifth
- Pentagonal Numbers
- Is this is a Tic Tac Toe X Win?
- Inscribed Pentagon?
- Circle/Pentagon Overlap
- Octoberfest festival
- Polarisation
- Missing five
- ASCII Birthday Cake
- Find the nearest prime number
- Extra safe primes
- 5 Prime Numbers
- Is this is a Tic Tac Toe X Win?
- Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
- MATLAB Counter
- Basic electricity in a dry situation
- How to subtract?
- Pernicious Anniversary Problem
- 5 Prime Numbers
- Is it really a 5?
- The glass half full
- Pi Digit Probability
- A Simple Tide Gauge with MATLAB
- Predicting life and death of a memory-less light bulb
- Write c^3 as sum of two squares a^2+b^2
- Van Eck's Sequence's nth member
- Sums of Multiple Pairs of Triangular Numbers
- Recaman Sequence - I
- Recaman Sequence - II
- Spot the First Occurrence of 5
- Energy of a photon
Problem Recent Solvers1419
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!