Knowing Lists


 

Learning how to use a calculator by reading its manual and punching buttons is boring and inefficient. It is better to do challenging tasks that require knowledge of a calculator's features together with some ingenuity, even if such tasks are not directed to any worthy goal.

 

Task.

 

Create randomly (with uniform distribution) a list of 100 numbers between 1 and 2. Find the largest number on the list that is smaller than √2, and the smallest number that is bigger than √2.

 

Hint: Do not look at the list!

 

A solution (the specific numbers will vary; the ones below came from an actual run).

 

rand(100)+1L1         creates a list of 100 random numbers between 1 and 2 and stores them in

list L1rand is under MATH and PRB.

 

{1.295661863    1 ...

 

sum(L1<√(2))          counts the number of items < √(2); sum is under 2nd LIST MATH 5:sum. < is under TEST.
  40    
SortA(L1)          sorts the list in ascending order; under 2nd LIST OPS 1:SortA(
  Done    
L1 (40)          40th element of the list;
  1.401465004    
L1 (41)          next element of the list;
  1.415903921    
√(2)          approximation of irrational number √(2).
  1.414213562    

Webpage Maintained by Owen Ramsey
Calculus Index