What is the main difference between the library sympy and the library numpy?
Given an n-element list contlist= = [1, 2, 3, ..., n-1, n] and a function rewrite() defined as:
def rewrite(inputlist):
rewrittenlist = []
for i in inputlist:
for j in inputlist:
rewrittenlist.append( (i,j) )
return rewrittenlist
rewrite(contlist)?rewrite function?How is a numpy array different from a python list?
Consider the following lines of code:
contlist = [1, 2, 3, 4]
contarray = numpy.array(contlist)
print(2 * contlist)
print(2 * contarray)
How will the output of the two print statements differ? Explain why.
Consider the sympy, numpy, and math libraries. Pick at least 3 functions from these libraries (3 total from any of them).
Write a problem that uses these functions and write out the solution to the problem using these functions.