Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Every time random() has been called we will use one of the random numbers from random number list then forget that number and move to
Every time random() has been called we will use one of the random numbers from random number list then forget that number and move to another. Example : 1 - Coin[floor(random() * length(Coin))] - Coin[floor(0.00798219 * 2)] - Coin[floor(0.01596)]
- Coin[0]
- "H" Example : 2
- Coin[floor(random() * length(Coin))]
- Coin[floor(0.95777 * 2)]
- Coin[floor(1.9114)]
- Coin[1]
- "T"
MATH 1111 : Chapter 9 : Lab 9.2 Some definitions for the lab. A = [5, 7, 2, 9, 1, 3, 4, 3, 5, 8, 7, 3 ] B = [5, 8, 3, 5, 9, 5, 4, 7, 1, 0, 5, 7, 8 ] C= ["W", "X", "Y", "A", "B", "M", "N", "P" ] D = ["A", "B", "C", "X", "Y", "Z", "G", "M", "T", "W" ] E = 3 F = "ABCDEFGH" G = "F" H = 5 T = [ [ 4, 5, 6 1, [4, 3 ], [1, 2, 3 ], [4, 5, 6, 7, 8 ], [7, 8,9]] W = "ABCJKLMNTVWXYZ" X = "PQRSTUVW" Y= [[ "A", "B", "C']["T. "RI["D", "E","FI["W, "X", "Y, "Z"]["G","H"]] Z = 23.658 Coin = [ "H", "T" ] Die = [ 1, 2, 3, 4, 5, 6 ] Starter = [ ] Blank = wu Each expression evaluation begins from these definitions. Any alterations during the evaluation of the expression is lost after the conclusion of the evaluation of that expression, although the alteration does hold in effect until the end of that evaluation.Random Number Function 1) 0.0 98219 2) 0.90 77 3) 0.569-94 4) 0.085 63 5) 0.7 -639 6) 0.11 72 7) 0.57 106 8) 0.45 769 9) 0.9 -287 10) 0.96172 11) 0.561944 12) 0.736736 13) 0.0398207 1 0.917949 15) 0.652045 16) 0.686816 17) 0.101823 18) 0.0118972 19) 0.967129 20) 0.48664 21) 0.469347 22) 0.636154 23) 0.92579 24) 0.810946 25) 0.316752 26) 0.601198 27) 0.0508473 28) 0.682362 29) 0.419461 30) 0.592436 31) 0.721678 32) 0.764962 33) 0.704385 34) 0.439848 35) 0.485942 36) 0.325005 37) 0.286768 38) 0.314429 39) 0.736418 40) 0.922427 41) 0.497034 42) 0.0954018 43) 0.407317 44) 0.357644 45) 0.346741 46) 0.178065 0.307877 48) 0.0171275 49) 0.820913 50) 0.493516 51) 0.242902 52) 0.72014 53) 0.776894 54) 0.318508 55) 0.921714 56) 0.43593 57) 0.910811 58) 0.485533 59) 0.822344 60) 0.194783MATH 1111 : Chapter 9 : Lab 9.2 Name Evaluate/Calculate Value 1 Coin[floor(random() * length(Coin))] " J 2 Coin[floor(random() * length(Coin))] 3 Coin[floor(random() * length(Coin))] Die[floor(random() * length(Die))] 5 Die[floor(random() * length(Die))] 5 Die[floor(random() * length(Die))] 1 7 charAt(F, floor(random() * length(F))) B charAt(F, floor(random() * length(F))) 9 charAt(F, floor(random() * length(F))) 10 T[floor(random() * 5)][floor(random() * 2)] 11 Y[floor(random() * length(Y))] 12 length(Y[floor(random() * length(Y))]) 13 floor(Z * random()) 14 floor(Z * random()) % 2 15 A[floor(random() * length(A))] - B[floor(random() * length(B))] 16 A[B[floor(random() * length(B))]] 17 alph[floor(random() * length(alph))] 18 A[floor(E * random())] 19 [ floor(E * random()), floor(H * random()), floor(E * random()) ] 20 random()Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started