Computers and Technology
Computers and Technology, 05.05.2020 04:19, Ben2752

1. [2 points] Write a function to compute the volume of a sphere, given its radius. 2. [2 points] Write a recursive function to raise a number to a power. 3. [2 points] The implementation of the function maxlist below generally manages to find the largest element in a list of integers, but fails if all are negative. Fix it by adding one line. mymax a b | a > b = a | b > a = b | otherwise = a maxlist [] = 0 maxlist (head:tail) = mymax head (maxlist tail) 4. [2 points] Use the built-in function zipWith to write a function wsum that adds up two lists, while double-weighting the elements of the first list: > wsum [2,4] [3,5] [7, 13] > wsum [1, 1, 1, 1] [1, 1, 1, 1] [3, 3, 3, 3] 5. [2 points] Write an expression to compute the sum of all the natural numbers less than one thousand that are multiples of 3 or 5.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, nancylagunas805
What does josh silverman name as the most important aspect of managing finances?
Answers: 2
image
Computers and Technology, 21.06.2019 23:00, pinkyglitter2696
Give an example of a case where a two-way handshake to establish a connection could leave one side of the connection live while the other side does not believe there is a connection.
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, anamatiascamaja
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, kandi2565
What is a programming method that provides for interactive modules to a website?
Answers: 1
Do you know the correct answer?
1. [2 points] Write a function to compute the volume of a sphere, given its radius. 2. [2 points] Wr...

Questions in other subjects:

Konu
Mathematics, 03.05.2021 15:20