import numpy as np
import scipy.linalg as la
import matplotlib.pyplot as plt
1. Choose a value and set the variable x to that value.
2. What is command to compute the square of x? Its cube?
import numpy as np
import scipy.linalg as la
import matplotlib.pyplot as plt
# 1
x = 42
print('x =', x)
# 2
x_square = x**2
print('x square =', x_square)
x_cube = x**3
print('x cube =', x_cube)
Comments
Leave a comment