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
SCORPION-xisa [38]
4 years ago
7

Clay is playing darts. his dartboard contains ten equal-sized zones with point values from 1 to 10. write code that simulates hi

s total score after 1000 dart tosses. make sure to use a for loop.
Mathematics
2 answers:
Zarrin [17]4 years ago
8 0
Instead of a real language, I'll use pseudo code here: 


var TOTAL_SCORE = 0
for(var x; i<1000; i++) {
      var SCORE rand.random_integer[from 1-10];
      var TOTAL SCORE = TOTAL_SCORE + SCORE;
}

print(TOTAL_SCORE);
    
allochka39001 [22]4 years ago
6 0

Answer:

Given parameters

Point values = 1 to 10 = 1,2,3...10

Dart tosses = 1000

Required:

Simulate total scores using a for loop

#This program is written using Python Programming Language

# Comments are used for explanatory purpose

#Program starts here

# The next line declares and initialize point_value as an array

point_value = make_array(1,2,3,4,5,6,7,8,9,10)

# The next line initializes total_score to 1

total_score =make_array(0)

# Initialise number of toss

tosses = 1000

# Simulate using for loop iteration

for i in np.arange(tosses)

result = np.random.choice(point_value)

# get score after playing each toss

total_score=np.append(total_score, result)

#calculate totalscores after 1000 games

totalscore=sum(total_score)

#Output result

print("The total score after simulation of 1000 tosses is ")

print(totalscore)

#End of program

You might be interested in
In ΔUVW, w = 44 cm, u = 83 cm and ∠V=141°. Find the area of ΔUVW, to the nearest square centimeter.
Tema [17]

Answer:

Area  \approx 1149\ cm^2

Step-by-step explanation:

<u>Given that:</u>

ΔUVW,

Side w = 44 cm, (It is the side opposite to \angle W)

Side u = 83 cm (It is the side opposite to \angle U)

and ∠V=141°

Please refer to the attached image with labeling of the triangle with the dimensions given.

Area of a triangle with two sides given and angle between the two sides can be formulated as:

A = \dfrac{1}{2}\times a\times b\times sinC

Where a and b are the two sides and

\angle C is the angle between the sides a and b

Here we have a = w = 44cm

b = u = 44cm

and ∠C= ∠V=141

Putting the values to find the area:

A = \dfrac{1}{2}\times 44\times 83\times sin141\\\Rightarrow A = \dfrac{1}{2} \times 3652 \times sin141\\\Rightarrow A =1826 \times 0.629\\\Rightarrow A  \approx 1149\ cm^2

So, the <em>area </em>of given triangle to the nearest square centimetre is:

Area  \approx 1149\ cm^2

8 0
4 years ago
A new battery's voltage may be acceptable (A) or unacceptable (U). A certain flashlight requires two batteries, so batteries wil
klio [65]

Answer:

The probability that you test exactly 4 batteries is 0.0243.

Step-by-step explanation:

We are given that a new battery's voltage may be acceptable (A) or unacceptable (U). A certain flashlight requires two batteries, so batteries will be independently selected and tested until two acceptable ones have been found.

Suppose that 90% of all batteries have acceptable voltages.

Let the probability that batteries have acceptable voltages = P(A) = 0.90

So, the probability that batteries have unacceptable voltages = P(U) = 1 - P(A) = 1 - 0.90 = 0.10

Now, the probability that you test exactly 4 batteries is given by the three cases. Firstly, note that batteries will be tested until two acceptable ones have been found.

So, the cases are = P(AUUA) + P(UAUA) + P(UUAA)

This means that we have tested 4 batteries until we get two acceptable batteries.

So, required probability = (0.90 \times 0.10 \times 0.10 \times 0.90) + (0.10 \times 0.90 \times 0.10 \times 0.90) + (0.10 \times 0.10 \times 0.90 \times 0.90)

     =  0.0081 + 0.0081 + 0.0081 = <u>0.0243</u>

<u></u>

Hence, the probability that you test exactly 4 batteries is 0.0243.

3 0
3 years ago
Please help
SVEN [57.7K]

Sorry, I did them out of order because I started doing the second problem first on accident.

For the second question: the probability that you choose a green marble is 2/(2 + 3 + 3) = 2/8 = 1/4. The probability that you choose a red marble without replacing the green one is: 3/(2 + 3 + 3 - 1) = 3/7. Now, multiply these two fractions together because they depend on each other:

1/4 * 3/7 = 3/28

For the first question: the probability you choose a green marble is still 1/4. The probability that you choose a yellow marble is 3/(2 + 3 + 3 - 1) = 3/7. Multiply these two fractions together and you get: 1/4 * 3/7 = 3/28 again.

The answer to both questions is 3/28.

5 0
3 years ago
Read 2 more answers
Two semicircles are placed in a rectangle, as shown below. The length of the rectangle is 48. And do not round your answer. Be s
ANTONII [103]

Answer and Step-by-step explanation:

Firstly, we should note that the rectangle given is a square. This is because, the diameter of the semicircle is the same horizontally and vertically

Since the length of the rectangle is 48, it means the radius of each semi circle is 24.

The area of one semicircle will be:

0.5πr²

Where r = 24 and π = 3.14

0.5 x 3.14 x 24 = 37.68 square units

Since we have two semicircles, then the area of both will be:

37.68 x 2 = 75.36 square units.

To find the area shaded portion. Since I cannot see the diagram, there are two possibilities. If the shaded potion is just the two semicircles, then the area is 75.36 square units. But if the shaded portion is what ever remains after taking out the semicircles, then the area would be:

48² – 75.36 = 2133.64 square units.

6 0
3 years ago
Plot the image of quadrilateral ABCD under a reflection across the x-axis.
OleMash [197]

Answer:

wsg??

Step-by-step explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Two chords intersect with the measures shown in the drawing<br> What is the value of x?
    12·1 answer
  • Jack’s sister is coming to visit him and parks in the hospital car park. The bar chart below shows some information about the ca
    8·1 answer
  • How to write an equation for the line perpendiculer and trhough the given ppoint?
    10·1 answer
  • Northside High School is having a spaghetti dinner fundraiser. In order to advertise, students place flyers on neighborhood door
    15·2 answers
  • The area of the base of a rectangular prism is 4 3/4 ft², and the height is 2 1/3 ft. Determine the volume of the rectangular pr
    6·1 answer
  • Is 2 1/7 not a rational number
    7·2 answers
  • Please help me with the question
    14·1 answer
  • Need help please?!?!?! Extra points!!!
    7·1 answer
  • What is the value of x in the figure above? Assume ↔B and ↔C are parallel.
    13·1 answer
  • Convert 3,200,000 to a significant notation
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!