0
0
SciPydata~10 mins

Why physical constants matter in computation in SciPy - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the physical constants module from scipy.

SciPy
from scipy import [1]
Drag options to blanks, or click blank then click option'
Asignal
Bintegrate
Coptimize
Dconstants
Attempts:
3 left
💡 Hint
Common Mistakes
Importing unrelated scipy modules like integrate or optimize.
Trying to import constants as a submodule incorrectly.
2fill in blank
medium

Complete the code to print the value of the speed of light constant.

SciPy
print(constants.[1])
Drag options to blanks, or click blank then click option'
Aspeed_of_light
BPlanck
Celectron_mass
Dgravitational_constant
Attempts:
3 left
💡 Hint
Common Mistakes
Using Planck or electron_mass which are different constants.
Using incorrect attribute names.
3fill in blank
hard

Fix the error in the code to correctly calculate energy using E=mc^2 with mass=2 kg.

SciPy
mass = 2
energy = mass * constants.[1] ** 2
print(energy)
Drag options to blanks, or click blank then click option'
Aspeed_of_light
Bgravitational_constant
Celectron_mass
DPlanck
Attempts:
3 left
💡 Hint
Common Mistakes
Using Planck constant instead of speed of light.
Using gravitational_constant which is unrelated here.
4fill in blank
hard

Fill both blanks to create a dictionary of constants with their values for speed of light and Planck constant.

SciPy
phys_constants = {
    'speed_of_light': constants.[1],
    'Planck_constant': constants.[2]
}
print(phys_constants)
Drag options to blanks, or click blank then click option'
Aspeed_of_light
BPlanck
Celectron_mass
Dgravitational_constant
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up constant names or using unrelated constants.
Using incorrect dictionary keys.
5fill in blank
hard

Fill in the blanks to compute the force using Newton's law: F = G * (m1 * m2) / r^2 with given values.

SciPy
m1 = 5.0
m2 = 10.0
r = 2.0
force = constants.[1] * (m1 * m2) / r[2] 2
print(force)  # Force in Newtons

# Use the correct operator and constant name
Drag options to blanks, or click blank then click option'
Aspeed_of_light
B**
Cgravitational_constant
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using speed_of_light instead of gravitational_constant.
Using multiplication '*' instead of exponentiation '**' for squaring.