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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
Aprovides legal protection for something an individual has created
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statement is true of web-based social media? a.they allow consumers to interact with and update content. b.they cannot be updated easily, as compared to print media. c.they are expensive to produce and maintain, as compared to print and television. d.they can exist independent of the internet.
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
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
question
Mathematics, 26.05.2021 21:30
question
Mathematics, 26.05.2021 21:30
Questions on the website: 13722360