Unformatted text preview: (in this example, n=10): * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * “No Computer” Question 2: Imagine that we had a new data type called uint6 , storing 6 bit unsigned integers. What’s the largest integer that uint6 could store correctly? “No Computer” Question 3: Write, save and use a function called myrandom that keeps generating new random numbers (decimals) until it generates a random number is within a specific range. The function should accept the minimum and maximum of the range as input arguments. It should return 2 outputs: 1) the number that fell in the range, and 2) the number of random numbers generated in order to find one in the range. “No Computer” Question 4: Write an anonymous function called log4 that calculates the log, base 4, of a number. Recall the change of base formula: log X Y = log(Y) / log(X)...
View
Full Document
 Fall '09
 blase
 Randomness, blue book

Click to edit the document details