1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mademuasel [1]
3 years ago
5

HELP PLEASEEEE!!!!!!!

Computers and Technology
1 answer:
Lubov Fominskaja [6]3 years ago
8 0
This is too little points for a question I’m sorry.
You might be interested in
The Monte Carlo method is commonly used to approximate areas or volumes of shapes. In this problem, we will use Monte Carlo to f
sdas [7]

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.

4 0
3 years ago
What is the working principle of computer?
ankoles [38]
The CPU is the working principle
8 0
3 years ago
Help ASAP!!Choose all the basic elements of algorithms. A.Selection B.Loops C.Flow Charts D.Sequencing E.Combinations F.Iteratio
serg [7]

Answer:

b c d

Explanation:

8 0
3 years ago
Read 2 more answers
If someone wouldn’t mind answering the first question for me
kompoz [17]

1.

  • Keep the title bold
  • <u>Underline</u> important statements
  • Colour the words (but the document shouldn't be too colourful)
8 0
3 years ago
A shop will give discount of 10% if the
wlad13 [49]

Answer:

10%÷100 it is correct answer

6 0
3 years ago
Other questions:
  • The HR department of a company wants to send out an email informing its employees about an upcoming social event. Which email ap
    11·2 answers
  • true or false manual handling of materials accounts for the primary source of energy in the workplace
    13·2 answers
  • Claudia has a bachelors degree in computer information systems and she has learned to use some popular software testing tolls wh
    13·2 answers
  • An index purports to speed data retrieval. you, therefore, index every attribute in each table. select the likely consequence.
    15·1 answer
  • What are your undertale + au ships?
    15·1 answer
  • Hi um... i just wanna say hi :P
    6·2 answers
  • What does a for loop look for in the sequence of data? Check all that apply.
    6·2 answers
  • GIVING OUT BRAINLIEST AND I AM ALSO WARNING EVERYONE TO NOT ANSWER A BUNCH OF rubbish just to get the points!
    7·2 answers
  • What would be an ideal scenario for using edge computing solutions?
    6·1 answer
  • Is a device used to test the network connection.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!