Challenge - 5 Problems
Physical Constants Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
ā Predict Output
intermediate2:00remaining
Calculate 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
intermediate1:30remaining
Retrieve 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
advanced1:30remaining
Understanding 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
advanced1:30remaining
Identify 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
expert2:30remaining
Calculate 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.