mahika.c06 and 40040 others unlocked
EECS 1520 Full Course Notes
54
EECS 1520 Full Course Notes
Verified Note
54 documents

Document Summary

Recall from test 1 that the graphic below is from a workbook to analyze probability in card games. 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_. 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. 11, 12, 13, and 14 are replaced by jack , The formula in card assembles rank and suit into the name as shown. Ace: write a formula for suit that does not use an if function. Use only the data shown to answer the following questions. All ranges have been named using the labels that appear in the worksheets. Pos is a random integer in the range 1 to.