Page:
of 2
Part C [10 points]
Use only the data shown to answer the following questions.
All ranges have been named using the labels that appear in the worksheets.
Recall from Test 1 that the graphic
below is from a workbook to analyze
probability in card games.
This section “deals” cards.
S_ is one of the integers 1, 2, 3, or 4, and is
randomly chosen.
Suit is assigned by an IF statement according
to the corresponding value of S_.
1 - Clubs
2 - Diamonds
3 - Hearts
4 - Spades
R_ is an integer in the range 2 to 14 inclusive,
also randomly chosen.
Rank is assigned by an IF statement according
to R_, using the following mapping:
Values in the range 2 to 10 are copied from
R_
11, 12, 13, and 14 are replaced by “Jack”,
“Queen”, “King”, and “Ace”
The formula in Card assembles Rank and Suit
into the name as shown.
1) Write a formula for Suit that does NOT use an IF function.[4]
= LOOKUP( S_, S_value, AssignSuit)
2) In general, why is this not a good way to “deal cards”? [1]
Limit your answer to ONE SENTENCE.
It produces duplicates.
xcards1
R_value AssignRank
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 Jack
12 Queen
13 King
14 Ace
S_value AssignSuit
1 Clubs
2 Diamonds
3 Hearts
4 Spades
Part C [10 points]
Use only the data shown to answer the following questions.
All ranges have been named using the labels that appear in the worksheets.
Here is an alternative technique for
“dealing cards”.
Pos is a random integer in the range 1 to
52, inclusive.
S_ is produced from the quotient of an
Integer division of Pos by 13.
R_ is produced from the remainder of
an Integer division of Pos by 13.
Suit and Rank use the same formulae as
previously.
3) Create the formula that produces the values of S_. [3]
=INT( Pos/13) +1
4) Does this method solve the problem identified in #2) above? Why (not)? [2]
No. It still produces duplicates.
xcards1