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
anastassius [24]
3 years ago
13

Generate a process that would generate random numbers between –1 and 1 for x and y positions of 10000 points and count how many

points fall with the circle, then determine an estimated version of π. (see below to generate floating point random numbers. this generation is not needed to describe the process, but to implement the process)
Mathematics
1 answer:
goblinko [34]3 years ago
5 0
<span>#!/usr/bin/env python

import random
import math
count_inside = 0
     for count in range(0, 10000): d = math.hypot(random.random(), random.random())
    if d < 1: count_inside += 1
count += 1
print 4.0 * count_inside / count</span>
You might be interested in
zahra cuts a loaf of bread into 5 equal pieces she then cuts each piece into 3 equal slices what fraction of the whole loaf is o
jarptica [38.1K]
One slice of bread would be 1/15
3 0
3 years ago
Somebody!!!!!!
sveta [45]
Where is your problem?? so we I can try to answer it...
4 0
3 years ago
Read 2 more answers
10. Given matrices A, B, and C below, perform the indicated operations if possible. If the operation is not possible, explain wh
Artemon [7]

Answer(a):

Order of matrix A = 3x3 {because number of rows=3, number of columns=3}

Order of matrix B = 3x3

Order of matrix C = 1x3


3A will be of order 3x3 because multiply by scalar doesn't change the order. Which is same as the order of matrix B.

So 3A+B is possible.

We simply multiply all elements of A with 3 and add them with corresponding elements of B.

3\begin{bmatrix}2 &  -1& 0\\ 0 &  5& 0.3\\ 1 &  4&10 \end{bmatrix}+\begin{bmatrix}5 &  0& 2\\ 1 &  -3& 9\\ 2 &  0& 4\end{bmatrix}= \begin{bmatrix}11 &  -3& 2\\ 1 &  12& 9.9\\ 5 &  12& 34\end{bmatrix}


Answer(b):

2B will be of order 3x3 because multiply by scalar doesn't change the order. Which is NOT same as the order of matrix C.

So 2B+C is NOT possible.

Answer(c):

CA is possible only if

number of columns of C = number of columns of A

3=3

which is true hence CA is possible.

\begin{bmatrix}1 &3  &5 \end{bmatrix}*\begin{bmatrix}2 &  -1& 0\\ 0 &  5& 0.3\\ 1 &  4&10 \end{bmatrix}=\begin{bmatrix}1*2+3*0+5*1 & 1*-1+3*5+5*4 & 1*0+3*0.3+5*10\end{bmatrix}

= \begin{bmatrix}7 &  34& 50.9\end{bmatrix}

<em><u>If the matrix is not visible properly then look at the attached picture.</u></em>

5 0
3 years ago
Jose and Jayden go to the movie theater and purchase refreshments for their friends. Jose spends a total of $43.25 on 5 bags of
Effectus [21]

Answer: The equations are as follows;

5p + 4d = 43.25 ————(1) and

3p + 2d = 24.25 ————(2)

Also a bag of popcorn costs $5.25

Step-by-step explanation: We start by assigning letters to the unknown variables. Let a bag of popcorn be p and let one drink be d. The clues given in the question include the cost of buying five bags of popcorn and four drinks which is a total of $43.25. This can be expressed as

5p + 4d = 43.25 ————(1)

Another clue is that three bags of popcorn and two drinks cost $24.25. This also can be expressed as

3p + 2d = 24.25 ————(2)

Now we have a pair of simultaneous equations as follows

5p + 4d = 43.25 ————(1)

3p + 2d = 24.25 ————(2)

We shall use the elimination method since all the unknowns have coefficients greater than 1. Multiply equation one by 3, and multiply equation two by 5 (so as to eliminate ‘p’)

5p + 4d = 43.25 ——— x3

3p + 2d = 24.25 ——— x5

15p + 12d = 129.75 ———(3)

15p + 10d = 121.25 ———(4)

Subtract equation (4) from equation (3) and we have

2d = 8.5

Divide both sides of the equation by 2

d = 4.25.

That means each drink costs $4.25

We can now substitute for the value of d into equation (2)

3p + 2d = 24.25

When d = 4.25

3p + 2(4.25) = 24.25

3p + 8.5 = 24.25

Subtract 8.5 from both sides of the equation

3p = 15.75

Divide both sides of the equation by 3

p = 5.25. This means a bag of popcorn costs $5.25

7 0
4 years ago
Solve Ax − By = C for x.
Travka [436]

For this case we have the following equation:

Ax - By = C

From here, we must clear the value of x.

Adding By on both sides:

Ax = By + C

Then, dividing both sides by A we have:

x = \frac {By + C} {A}

Answer:

x = \frac {By + C} {A}

x equals the quantity B times and plus C all over A

5 0
3 years ago
Other questions:
  • A jar contains 30 red marbles, 50 blue marbles and 20 white marbles.You pick one marble from the jar at random. Find each theore
    15·2 answers
  • Using arithmetic operations, rewrite this polynomial in standard, simplest form. (3x2 + 9x + 6) − (8x2 + 3x − 10) + (2x + 4)(3x
    13·1 answer
  • 25 1/2 is what percent of 85
    8·2 answers
  • Find P(Red King | Card with a letter) <br><br> a) 1/16 <br> b) 1/8 <br> c) 1/6 <br> d) 1/3
    5·1 answer
  • Please help asap 25 pts
    9·2 answers
  • At the ice cream shop. There are 14 shakes sold for every 6 malts. What is the ratio of malts to shakes
    8·2 answers
  • Find the slope of the line which goes through the given points. a A(2,4) and B(4,9)
    14·1 answer
  • 1/3 x 2/3, Please help me with this, I am struggling.
    5·1 answer
  • 4. Is there a variable factor common to 24a and 6?​
    13·1 answer
  • PLEASE FRICKING HELP ME IF YOU SEE THIS
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!