Answer:
Monday Video: 5.4.20 Section 18.5
Work due: 18.5 Worksheet
CW
Tuesday Video: 5.5.20 Section 18.6
Work due: 18.6 Worksheet
HW
Wednesday Video: 5.6.20 Section 18.7
Work due: 18.7 Classwork
CW
Thursday Video: 5.7.20 Section 18.7
Work due: 18.7 Homework
HW
Friday Video: 5.8.20 Section 18.5-18.7
Work due: Textbook page 615 #5-19 (not #13)
HWaccuracy
Explanation:
Answer:
import numpy as np
import matplotlib.pyplot as plt
def calculate_pi(x,y):
points_in_circle=0
for i in range(len(x)):
if np.sqrt(x[i]**2+y[i]**2)<=1:
points_in_circle+=1
pi_value=4*points_in_circle/len(x)
return pi_value
length=np.power(10,6)
x=np.random.rand(length)
y=np.random.rand(length)
pi=np.zeros(7)
sample_size=np.zeros(7)
for i in range(len(pi)):
xs=x[:np.power(10,i)]
ys=y[:np.power(10,i)]
sample_size[i]=len(xs)
pi_value=calculate_pi(xs,ys)
pi[i]=pi_value
print("The value of pi at different sample size is")
print(pi)
plt.plot(sample_size,np.abs(pi-np.pi))
plt.xscale('log')
plt.yscale('log')
plt.xlabel('sample size')
plt.ylabel('absolute error')
plt.title('Error Vs Sample Size')
plt.show()
Explanation:
The python program gets the sample size of circles and the areas and returns a plot of one against the other as a line plot. The numpy package is used to mathematically create the circle samples as a series of random numbers while matplotlib's pyplot is used to plot for the visual statistics of the features of the samples.
The answer to this should be B. Worm. A pinion is a the smallest gear out of the listed ones above. spur would be next then wheel and the biggest if them all would be the spur. I'm not completely sure if my answer is 100% correct, but I feel confident enough about it. Hope this helps. :)
The best and most correct answer among the choices provided by the question is the third choice "It will be a space laboratory for scientists"<span>
The main purpose of the International Space Station<span> is to provide an </span>international<span> laboratory for experiments within the </span>space<span> environment. Which, despite all our technological advances, is nearly impossible to replicate here on Earth.
</span>
I hope my answer has come to your help. God bless and have a nice day ahead!</span>
Answer:
public class Main
{
public static void main(String[] args) {
int carYear = 1995;
if(carYear < 1967)
System.out.println("Probably has few safety features.");
if(carYear > 1971)
System.out.println("Probably has head rests.");
if(carYear > 1992)
System.out.println("Probably has anti-lock brakes.");
if(carYear > 2002)
System.out.println("Probably has tire-pressure monitor.");
}
}
Explanation:
The code is in Java.
Initialize the carYear
Use if statements to handle year before 1967, after 1971, after 1992 and after 2002.
Print the required message for each if statement