please
make sure the answer is correct %100
program logic:
program:
Note: documentaion of the code is provided in comments
import numpy as np
import matplotlib.pyplot as plt
x = [1,2,3,4,5,6]
y = [2,5,9,12,21,35]
#there are 6 data points
#it is possible to fit a 5th degree polynomial
#the fit will produce the coefficients as output
p = np.polyfit(x,y,5)
#x[0]**n * p[0] + ... + x[0] * p[3] + p[4] = y[0]
#x[1]**n * p[0] + ... + x[1] * p[3] + p[4] = y[1]
#...
#x[5]**n * p[0] + ... + x[5] * p[3] + p[4] = y[5]
xfit = np.linspace(1,6,100)
yfit = np.polyval(p,xfit)
plt.scatter(x,y,label="data points")
plt.plot(xfit,yfit,label="fit")
plt.xlabel("x")
plt.ylabel("y")
plt.legend()
plt.show()
output plot:
please make sure the answer is correct %100 P1 This project requires you to solve the...
Please make sure the answer is
correct 100% and to solve all parts clearly
Tiara Company has the following historical collection pattern for its credit sales: 70% collected in month of sale 15% collected in the first month after sale 10% collected in the second month after sale 4% collected in the third month after sale 1% uncollectible Budgeted credit sales for the last six months of the year follow. $ June 64,000 July 60,000 August 70,000 September 80,000 October...
C++
please
Project: Working with Text Write an object-oriented program the performs the following tasks: . Reads a text file provided along with this data and maintains it an object. Determines the number of characters and keeps in the object. Determines the number of words and retains the result in the object. Determines the number of paragraphs and keeps the result in the object. A possible class definition: class Textutil { string text = ** int words = @; int...