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.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
Computer is an electronic and digital device. Computer can be used everywhere in our daily life. You can use a computer to search for something over the internet related to your study etc.
The following fields where you can see the use of computers.
- Education
- Business
- Hospital
- Banking sector
- Home
- Marketing
- Government offices
- etc
You can see the use of computers everywhere in our daily life.
Answer:
Option (D) i.e., cloud computing is the correct answer to the following question.
Explanation:
The following option is correct because cloud computing is a better way to store our application, data, and programs on the internet with privacy and without storing them into the hard drives.
So, that's why the following option is correct. It simple words, cloud computing provides us the facility to store data through the internet without storing them into the drive.
Answer: 2) To provide instruction for how the structure should look
4) To provide instruction for how the content should look
Explanation:
HTML 5 is a hypertext markup language revision which basically provide the structure and content to the page. It is a standard programming which basically describe the content of the web page. It reduce the overall development time and it is faster.
In the remaining option, It does not provide any meaning as we cannot add structure directly we should use the CSS styling for the particular document.
Therefore, (2) and (4) option are correct.
Answer: B) Web robot
Explanation:
Web robot or spider is the search engine program which automatically visit the new web site and update the information. Basically, it is the internet bot that helps in store the information from the search engine to the index.
Spider searches the web site and read the information in their given page for creating the entries from search engine.
Web robot is also known as web crawler, this type of programs are use by different search engine that automatically download and update the web content on web sites.