subject
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.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, ed72018373
Which law requires employers to provide safe working environments for their employees? a. civil rights act b. fair labor standards act c. occupational safety and health act d. wagner act
Answers: 1
image
Computers and Technology, 24.06.2019 17:50, jones03riley
You work in the accounting department and have been using a network drive to post excel workbook files to your file server as you complete them. when you attempt to save a workbook file to the drive, you see the error message: “you do not have access to the folder ‘j: \’. see your administrator for access to this folder.” what should you do first
Answers: 2
image
Computers and Technology, 24.06.2019 20:20, jdkrisdaimcc11
Write python code that prompts the user to enter his or her age and assigns the user’s input to an integer variable named age.
Answers: 1
image
Computers and Technology, 24.06.2019 21:40, Jsusussueususu
is on drugs i swear i ask a question and its not showing whats going
Answers: 2
You know the right 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
English, 28.09.2020 21:01
Konu
English, 28.09.2020 21:01
Konu
History, 28.09.2020 21:01
Konu
Mathematics, 28.09.2020 21:01