Challenge - 5 Problems
Physical Constants Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
โ Predict Output
intermediateCalculate energy of a photon using Planck's constant and frequency
Given the frequency of a photon as 5e14 Hz, what is the energy of this photon using Planck's constant from scipy.constants?
SciPy
from scipy.constants import h frequency = 5e14 energy = h * frequency print(energy)
Attempts:
2 left
๐ก Hint
Energy of a photon is Planck's constant times frequency.
โ Incorrect
Energy = h * frequency. Using h = 6.62607015e-34 Jยทs and frequency = 5e14 Hz, energy = 3.313e-19 J.
โ data_output
intermediateRetrieve and display speed of light and Planck constant values
Using scipy.constants, what are the values of the speed of light and Planck constant printed as a tuple (speed_of_light, planck_constant)?
SciPy
from scipy.constants import c, h print((c, h))
Attempts:
2 left
๐ก Hint
Use scipy.constants.c and scipy.constants.h for exact values.
โ Incorrect
The exact speed of light is 299792458 m/s and Planck constant is 6.62607015e-34 Jยทs in scipy.constants.
๐ง Conceptual
advancedUnderstanding units of Planck constant and speed of light
Which of the following correctly describes the units of Planck constant and speed of light?
Attempts:
2 left
๐ก Hint
Think about what Planck constant and speed of light physically represent.
โ Incorrect
Planck constant measures energy-time product, so units are Joule seconds. Speed of light is a velocity, so meters per second.
๐ง Debug
advancedIdentify the error in this code using scipy.constants
What error does the following code produce?
from scipy.constants import speed_of_light
print(speed_of_light)
SciPy
from scipy.constants import speed_of_light print(speed_of_light)
Attempts:
2 left
๐ก Hint
Check the exact name of the constant in scipy.constants.
โ Incorrect
The correct name is 'c' for speed of light, not 'speed_of_light'. Importing 'speed_of_light' causes ImportError.
๐ Application
expertCalculate wavelength from photon energy using scipy.constants
Given a photon energy of 4e-19 Joules, calculate the wavelength in meters using Planck constant and speed of light from scipy.constants. Which option is the correct wavelength?
SciPy
from scipy.constants import h, c energy = 4e-19 wavelength = (h * c) / energy print(wavelength)
Attempts:
2 left
๐ก Hint
Use wavelength = (Planck constant * speed of light) / energy.
โ Incorrect
Wavelength = (h * c) / energy = (6.62607015e-34 * 299792458) / 4e-19 โ 4.97e-07 meters.
