Which NumPy function is used to compute the sine of an angle (in radians)?
A
np.sin() B
np.sine() C
np.trig.sin() D
np.rad.sin()
Analysis & Theory
`np.sin()` computes the sine of an angle given in radians.
What is the output of `np.cos(np.pi)`?
A
-1.0 B
0.0 C
1.0 D
Undefined
Analysis & Theory
Cosine of π radians is -1.0.
Which function converts degrees to radians in NumPy?
A
np.toRadians() B
np.radians() C
np.degreesToRadians() D
np.rad()
Analysis & Theory
`np.radians()` converts degrees to radians.
What is the result of `np.degrees(np.pi/2)`?
A
90.0 B
180.0 C
45.0 D
1.57
Analysis & Theory
`np.degrees()` converts radians to degrees. π/2 radians is 90 degrees.
Which function is used to compute the inverse sine (arcsin) in NumPy?
A
np.asin() B
np.inverse.sin() C
np.arcsin() D
np.inv_sin()
Analysis & Theory
`np.arcsin()` returns the inverse sine (in radians).
What is the output of `np.tan(np.pi/4)`?
A
1.0 B
0.0 C
-1.0 D
Undefined
Analysis & Theory
Tangent of π/4 radians is 1.0.
Which function is used to compute the hypotenuse (i.e., √(x² + y²)) in NumPy?
A
np.sqrt(x**2 + y**2) B
np.hypot(x, y) C
np.trig.hyp() D
np.pythagoras(x, y)
Analysis & Theory
`np.hypot(x, y)` computes the Euclidean norm √(x² + y²).