Ch 02 Quiz 1
-
Make a list
q1
containing the integers 101, 110, 119, 128, 137, 146, 155, 164, 173, 182, 191, 200, 209, 218, and 227. -
Write a function
q2
that takes in a list of numbers and puts out a list with each of those numbers tripled. Also write a signature for this function. -
Write a function
q3
that takes in a numbertop
and a list of numbers, and puts out a list of all of the numbers in the list whose squares are less thantop
. Also write a signature for this function.q3 5000 [10..100] == [10..70]
-
The function
q4
takes in a list ofFloat
and puts out aFloat
: the sum of the square roots of all of the numbers in the input list. Write a recursive function, do not usesum
.q4 [10.0, 20.0, 30.0] = 13.111...
Bonus
-
The function
digits
returns a list of the base 10 digits of a number in order from least significant (the ones digit) to most significant. Write it.digits 5347500 = [0,0,5,7,4,3,5]
Mega Bonus
- Largest palindrome product. A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers.