# Test 1 version 2 part d

24 views2 pages
Published on 21 Apr 2013
School
Course
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
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 Rank that does NOT use an IF function.[4]
= LOOKUP( R_, R_value, AssignRank)
2) In general, why is this not a good way to “deal cards”? [1]
It produces duplicates.
xcards2
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
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.