Question #205276

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?


Expert's answer

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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS