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
Tanya [424]
3 years ago
6

A bowl contains 20 candies; 15 are chocolate and 5 are vanilla. You select 5 at random. What is the probability that all 5 are c

hocolate?
Computers and Technology
2 answers:
Sindrei [870]3 years ago
5 0

Answer: 0.1937

Explanation:

Given : A bowl contains 20 candies; 15 are chocolate and 5 are vanilla.

If we select 5 candies, then the number of ways to select them is given by permutations.

The number of ways to select 5 candies is given by :-

^{15}P_5=\dfrac{15!}{(15-5)!}=\dfrac{15\times14\times13\times12\times11\times10!}{10!}=360360

The number of ways of selecting any 5 candies out of 20:-

^{20}P_5=\dfrac{20!}{(20-5)!}\\\\=\dfrac{20\times19\times18\times17\times16\times15!}{15!}\\\\=1860480

Now, the probability that all 5 are chocolate :-

=\dfrac{360360}{1860480}=0.193691950464\approx0.1937

Hence, the probability that all 5 are chocolate =0.1937

Furkat [3]3 years ago
3 0

Answer:

A bowl contains 20 candies; 15 are chocolate and 5 are vanilla.

If we select 5 candies, then the number of ways to select them is given by permutations.

The number of ways to select 5 candies is given by :-

^{15}P_5=\dfrac{15!}{(15-5)!}=\dfrac{15\times14\times13\times12\times11\times10!}{10!}=360360

15

P

5

=

(15−5)!

15!

=

10!

15×14×13×12×11×10!

=360360

The number of ways of selecting any 5 candies out of 20:-

\begin{lgathered}^{20}P_5=\dfrac{20!}{(20-5)!}\\\\=\dfrac{20\times19\times18\times17\times16\times15!}{15!}\\\\=1860480\end{lgathered}

20

P

5

=

(20−5)!

20!

=

15!

20×19×18×17×16×15!

=1860480

Now, the probability that all 5 are chocolate :-

=\dfrac{360360}{1860480}=0.193691950464\approx0.1937=

1860480

360360

=0.193691950464≈0.1937

Hence, the probability that all 5 are chocolate

You might be interested in
The process of changing a program’s internal structure without changing the way the program works is ______________.
aev [14]

Explanation: changing the coding and not the way it works.

7 0
3 years ago
Why a management-focused program provides a more appropriate learning path for you than a program based heavily on technical con
AlekseyPX
The program makes more money
3 0
3 years ago
What is an example of a hard skill?
Serjik [45]
3 would be self management
4 0
3 years ago
Read 2 more answers
Design a program for the Hollywood Movie Rating Guide, which can be installed in a kiosk in theaters. Each theater patron enters
ehidna [41]

Answer:

The program in cpp is given below.

#include <iostream>

using namespace std;

int main()

{

   //variables declared to hold sum, count and average of movie ratings

   int sum=0;

   int count=0;

   int rating;

   double avg;

   //audience is prompted to enter ratings

   do{

       std::cout << "Enter the rating (0 to 4): ";

       cin>>rating;

       if(rating>4)

           std::cout << "Invalid rating. Please enter correct rating again." << std::endl;

       if(rating>=0 && rating<=4)

       {

           sum=sum+rating;

           count++;

       }

       if(rating<0)

           break;

   }while(rating>=0);

   //average rating is computed

   avg=sum/count;

   std::cout << "The average rating for the movie is " << avg << std::endl;  

   return 0;

}

OUTPUT

Enter the rating (0 to 4): 1

Enter the rating (0 to 4): 2

Enter the rating (0 to 4): 0

Enter the rating (0 to 4): 5

Invalid rating. Please enter correct rating again.

Enter the rating (0 to 4): 1

Enter the rating (0 to 4): -1

The average rating for the movie is 1

Explanation:

1. Variables are declared to hold the rating, count of rating, sum of all ratings and average of all the user entered ratings.

2. The variables for sum and count are initialized to 0.

3. Inside do-while loop, user is prompted to enter the rating for the movie.

4. In case the user enters a rating which is out of range, the user is prompted again to enter a rating anywhere from 0 to 4.

5. The loop executes until a negative number is entered.

6. Inside the loop, the running total sum of all the valid ratings is computed and the count variable is incremented by 1 for each valid rating.

7. Outside the loop, the average is computed by dividing the total rating by count of ratings.

8. The average rating is then displayed to the console.

9. The program is written in cpp due to simplicity since all the code is written inside main().

6 0
3 years ago
Assume that a gallon of paint covers about 350 square feet of wall space. Create anapplication with a main() method that prompts
Elena-2011 [213]

Answer:

import java.util.Scanner;

public class PaintClculator {

   public static void main(String[] args) {

Scanner in = new Scanner(System.in);

       System.out.println("Enter Values for length, width, and height of the room");

       double length = in.nextDouble();

       double width = in.nextDouble();

       double height = in.nextDouble();

       double wallArea = calculateWallArea(length,width,height);

       double noGallons = calculatePaint(wallArea);

       double price = price(noGallons);

       System.out.println("Price is: "+ price);

   }

   // Creating Method to Calculate Wall Area

   public static double calculateWallArea( double length, double width, double height){

       // formular for the surface area of a room Area=2*length*heigth+2*width*height+lenth*width

       double Area = 2*length*height+2*width*height+length*width;

       System.out.println("Wall Area: "+Area);

       return Area;

   }

   //Creating method to calculate amount of paint

   public static double calculatePaint(double Area){

       double noGallons = Area/350;

       System.out.println("Number of gallons: "+noGallons);

       return noGallons;

   }

   // Creating Method Calculate Price

   public static double price(double noGallons){

       return noGallons*32;

   }

}

Explanation

  1. Created Three Methods in all; calculateWallArea(), calculatePaint(), and price()
  2. Method calculateWallArea() calculates area based on this formula Area=2*length*heigth+2*width*height+lenth*width
  3. The value of Area is passed to method calculatePaint() Which calculates the number of gallons required to cover the area given that one gallon covers 350 wall space
  4. Method price() calculates and dis[plays the price by calling method calculatePaint() that returns number of gallons. since one gallon is 32$
3 0
3 years ago
Other questions:
  • Solve system of equations. <br>x+2y-z=4<br>2x-y+3z=8 <br>-2x+3y-2z=10
    12·1 answer
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • Write a method so that the main() code below can be replaced by the simpler code that calls method mphandminutestomiles(). origi
    14·2 answers
  • Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k ti
    8·1 answer
  • A virus is a self-replicating program that produces its own code by attaching copies of it into other executable codes.
    7·1 answer
  • During the _____ of the systems development life cycle (SDLC), an information system is operating, enhancements and modification
    9·1 answer
  • Look at the following function prototype. double mynewFunction(int); What is the data type of the function’s return variable?
    11·1 answer
  • Assignment 6: Animation
    7·1 answer
  • Which command tells the for loop what to count by?
    9·2 answers
  • How does technology affect our daily lives essay
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!