Quote History Quoted:
A photon has no mass when it is not moving. But it has mass when it is moving at the speed of light.
View Quote
You're going to give a false impression to the guy if we don't expand on that a bit.
There's rest mass and relativistic mass. Rest mass is a non-varying quantity which is the same for all observers in all frames of reference (so regardless of relative motion), while relativistic mass is dependent on the velocity of the observer. A free photon is never at rest relative to anything (the wavelength changes, not the speed) so it can have a rest mass of zero while having a non-zero relativistic mass. Plank worked out through his work on black body radiation (IIRC) that E=hf (E is energy, h is plank's constant, f is frequency). Einstein worked out that E=mc^2.
So if we go from Einstein's mass-energy equivalence equation E=mc^2 and Plank's equation E=hf, since E=hf and E=mc^2 then hf=mc^2 and m=hf/c^2. Thus hf/c^2 is the mass of the photon and the mass of a photon is proportional only to its frequency since all the other numbers are constant. FWIW, Plank's constant is a mind shatteringly small number: 6.626176 x 10^-34 joule-seconds. To put that in what I think are more human readable numbers it's .0000000000000000000000000000000006626176 joule-seconds (pretty sure I got all the zeros in there).
The coolest thing about light is how it has repeatedly taught us that no matter how strange the universe might superficially appear, it's much stranger in detail.
Also, not a dumbshit question. About as far from a dumbshit question as I've ever seen on Arfcom.