License: CC-BY-NC-SA 4.0
I found an issue¶
Thank you! Please report it at https://
Latex Macros¶
\providecommand{\myvec}[1]{{\mathbf{\boldsymbol{{#1}}}}}
\providecommand{\mymatrix}[1]{{\mathbf{\boldsymbol{{#1}}}}}Valid imports¶
from math import pi, sin, cos
import numpy as npphi = pi/4.0
e1 = sin(phi) + 4 * cos(phi / 5)
# Printing the result is NOT a mandatory part of the answer.
print(f'e1 = {e1}')e1 = 4.657860143567099
Exercise 2¶
A2 = np.array([[5, 2],
[3, 5]])
B2 = np.array([[5, 3],
[3, 8]])
C2 = A2 + B2 + (A2 @ B2) - (B2 @ A2)
# Printing the result is NOT a mandatory part of the answer.
print(f'C2 = {C2}')C2 = [[ 7 11]
[-3 16]]