For all of these questions, assume we have
at the top of our Definitions window.
Assume we have some list li
.
Write an expression that evaluates to a Boolean that indicates whether li
contains the Number 29
.
L.member(li, 29)
Assume we have some list temps
containing temperature readings in degrees Fahrenheit.
Which operations would we use to convert all of the temps to Celsius?
[ ] filter
[ ] distinct
[ ] member
[ ] map
[ ] length
[ ] filter
[ ] distinct
[ ] member
[X] map
[ ] length
Assume we have some list temps
containing temperature readings in degrees Fahrenheit.
Which operations would we use to find the temperatures below freezing?
[ ] filter
[ ] distinct
[ ] member
[ ] map
[ ] length
[X] filter
[ ] distinct
[ ] member
[ ] map
[ ] length
Assume we have some list temps
containing temperature readings in degrees Fahrenheit.
Which operations would we use to round all of the temps to the nearest whole number?
[ ] filter
[ ] distinct
[ ] member
[ ] map
[ ] length
[ ] filter
[ ] distinct
[ ] member
[X] map
[ ] length
Assume you are given a list of strings and want the number of unique strings,
considering two strings to be the same if they have the same letters but perhaps
different capitalization. Which of the following list functions would you
expect to need for this computation?
[ ] L.filter
[ ] L.map
[ ] L.distinct
[ ] L.length
[ ] L.member
[ ] L.filter
[X] L.map
[X] L.distinct
[X] L.length
[ ] L.member