0
0
SciPydata~20 mins

Physical constants (speed of light, Planck) in SciPy - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
šŸŽ–ļø
Physical Constants Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
ā“ Predict Output
intermediate
2: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)
A1.5e-19
B6.626e-34
C3.313e-19
D9.11e-31
Attempts:
2 left
šŸ’” Hint
Energy of a photon is Planck's constant times frequency.
ā“ data_output
intermediate
1: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))
A(3.14e8, 6.626e-34)
B(3e8, 6.626e-34)
C(299792458, 1.602e-19)
D(299792458.0, 6.62607015e-34)
Attempts:
2 left
šŸ’” Hint
Use scipy.constants.c and scipy.constants.h for exact values.
🧠 Conceptual
advanced
1: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?
APlanck constant: Joule seconds (JĀ·s), Speed of light: meters per second (m/s)
BPlanck constant: meters per second (m/s), Speed of light: Joule seconds (JĀ·s)
CPlanck constant: kilograms (kg), Speed of light: seconds (s)
DPlanck constant: Newtons (N), Speed of light: meters (m)
Attempts:
2 left
šŸ’” Hint
Think about what Planck constant and speed of light physically represent.
šŸ”§ Debug
advanced
1: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)
AImportError: cannot import name 'speed_of_light'
BNameError: name 'speed_of_light' is not defined
CAttributeError: module 'scipy.constants' has no attribute 'speed_of_light'
DNo error, prints 299792458.0
Attempts:
2 left
šŸ’” Hint
Check the exact name of the constant in scipy.constants.
šŸš€ Application
expert
2: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)
A7.50e-07
B4.97e-07
C1.24e-06
D3.31e-19
Attempts:
2 left
šŸ’” Hint
Use wavelength = (Planck constant * speed of light) / energy.