Question

2. Let us construct a 36-card deck by removing all the hearts and kings out of a standard 52-card deck. That is, we have 12 f

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

1)

Probability will be = C(12,1)*C(11,1)*C(3,2)/C(36,5)=0.001050420168067

2)

clc
clear all
close all
FH=0;
a=randi(12,1,5);
a=sort(a);
if((a(1)==a(2)&&a(3)==a(4)&&a(4)==a(5))||(a(1)==a(2)&&a(2)==a(3)&&a(4)==a(5)))
FH=1;
else
FH=0;
end
disp(['FH is ' num2str(FH)]);

clear all close all FH=0 ; a-randi (12,1,5) a=sort (a) ; íf ( (a (1)-a (2) &&a (3)-a (4) &&a (4)-a (5) ) I 1 (a (1)-a (2) &&a

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
2. Let us construct a 36-card deck by removing all the hearts and kings out of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A standard deck of cards consists of four suits (clubs, diamonds, hearts, and spades), with each...

    A standard deck of cards consists of four suits (clubs, diamonds, hearts, and spades), with each suit containing 13 cards (ace, two through ten, jack, queen, and king) for a total of 52 cards in all. How many 7-card hands will consist of exactly 3 kings and 2 queens?

  • discrete structure Recall that a standard deck of 52 cards has 4 suits (hearts, diamonds, spades, and clubs), each of w...

    discrete structure Recall that a standard deck of 52 cards has 4 suits (hearts, diamonds, spades, and clubs), each of which has 13 ranks: 2-10, Jack, Queen, King, and Ace (in order from lowest to highest). Order of cards in a hand does not matter (a) (10 points) A full house is 3 cards of one rank and 2 of another rank. How many full houses are there in a 5-card hand if either the pair or the 3 of...

  • 52 card deck, 13 values, 4 suits 6 cards are dealt randomly. Possible outcomes? All hearts?...

    52 card deck, 13 values, 4 suits 6 cards are dealt randomly. Possible outcomes? All hearts? 3 kings 3 aces?

  • 2.2.21. Let A be the set of five-card hands dealt from a 52-card poker deck, where...

    2.2.21. Let A be the set of five-card hands dealt from a 52-card poker deck, where the denominations of the five cards are all consecutive—for example, (7 of hearts, 8 of spades, 9 of spades, 10 of hearts, jack of diamonds). Let Bbe the set of five-card hands where the suits of the five cards are all the same. How many outcomes are in the event A ∩ B? the final answer is 40

  • Write a class named Card which will represent a card from a deck of cards. A...

    Write a class named Card which will represent a card from a deck of cards. A card has a suit and a face value. Suits are in order from low to high: Clubs, Diamonds, Hearts and Spades. The card values from low to high: 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, and Ace. Write a Deck class that contains 52 cards. The class needs a method named shuffle that randomly shuffles the cards in the...

  • Write in Java! Do NOT write two different programs for Deck and Card, it should be...

    Write in Java! Do NOT write two different programs for Deck and Card, it should be only one program not 2 separate ones!!!!!! !!!!!!!!!!!!!!!Use at least one array defined in your code and two array lists defined by the operation of your code!!!!!!!!!!!!!!!!!!!!! The array should be 52 elements and contain a representation of a standard deck of cards, in new deck order. (This is the order of a deck of cards new from the box.) The 2 Array lists...

  • 5. In a poker game, 5 cards are dealt from a standard 52 card deck that...

    5. In a poker game, 5 cards are dealt from a standard 52 card deck that has been well shuffled. You are the only player in this scenario. (Note: if you are not familiar with poker hands, you may want to look up what some of these are online-also check out Chapter 23 in the textbook.) a) How many 5 card hands are possible? b) What is the probability that you are dealt two pairs? c) What is the probability...

  • (Card Shuffling and Dealing) Modify the program below so that the card-dealing function deals a five-card...

    (Card Shuffling and Dealing) Modify the program below so that the card-dealing function deals a five-card poker hand. Then write the following additional functions: a) Determine whether the hand contains two pairs b) Determine whether the hand contains a full house (i.e., three of a kind with pair). c) Determinewhetherthehandcontainsastraight flush (i.e.,fivecardsofconsecutivefacevalues). d) Determine whether the hand contains a flush (i.e., five of the same suit) #include <stdio.h> #include <stdlib.h> #include <time.h> #define SUITS 4 #define FACES 13 #define CARDS...

  • 7.12 (Card Shuffling and Dealing) Modify the program in Fig. 7.24 so that the card-dealing function deals a five-card...

    7.12 (Card Shuffling and Dealing) Modify the program in Fig. 7.24 so that the card-dealing function deals a five-card poker hand. Then write the following additional functions: a) Determine whether the hand contains a pair. b) Determinewhetherthehandcontainstwopairs. c) Determine whether the hand contains three of a kind (e.g., three jacks). d) Determinewhetherthehandcontainsfourofakind(e.g.,fouraces). e) Determine whether the hand contains a flush (i.e., all five cards of the same suit). f) Determine whether the hand contains a straight (i.e., five cards of...

  • C++ programming: Card game Can same one help me out with a example finsih and working...

    C++ programming: Card game Can same one help me out with a example finsih and working programm ? Program the basis for a card game (as a class card game): ● A card is represented by its suit/symbol (clubs, spades, hearts, diamonds) and a value (seven, eight, nine, ten, jack, queen, king, ace). ● A deck of cards consists of a pile of 32 cards that are completely connected to four players are distributed. ● Implement the following menu: ===...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT