This preview shows page 1. Sign up to view the full content.
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. Whats 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
This note was uploaded on 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.
 Fall '09
 blase

Click to edit the document details