1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
irga5000 [103]
3 years ago
7

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.
Computers and Technology
1 answer:
pshichka [43]3 years ago
4 0

Answer:

How to write Python Program to find Volume and Surface area of Sphere with example. Before we step into the Python Program to find Volume and Surface Area of Sphere, Let see the definitions and formulas

Surface Area of Sphere

A Sphere looks like a basketball or we can say the three-dimensional view of a circle. If we know the radius of the Sphere then we can calculate the Surface Area of Sphere using formula:

Explanation:

You might be interested in
Why is there no ide length or timing for study breaks?​
Ghella [55]

Answer:

Could you add more to ur question?

4 0
3 years ago
​Lara is the chief editor of "Laughter and Life," an online magazine. Lara has assigned Jenny the task of redesigning the magazi
Zarrin [17]

Answer:

The "A" option is correct.

Explanation:

For CSS flexbox layout, the property "align-content" requires that the space in the flexbox is more than enough to show the items. In this case, to distribute evenly the items and show the first and last items aligned with the start and end of the main axis, the only suitable option is "space-between". This option leaves no space at the start or at the end of the flexbox, distributing the remaining space between the elements into the flexbox.

7 0
3 years ago
Zohan uses the following analogy to describe a concept of object-oriented programming. A button can have many uses. When it is p
Vika [28.1K]

Answer:

Polymorphism

Explanation:

You can have a basic button class that gets inherited by other classes.

class Button {

function pushButton(){}

}

class ElevatorButton extends Button{};

class BigRedButton extends Button{};

With these new classes, they inherit from the basic button class. They can decide what happens when the method pushButton() is called.

You don't need to worry about what pushButton() actually does, you can just call it if the object is of the type "Button" and you can expect it to work.

4 0
2 years ago
There exists a data type Date with member function Increment that increments the current Date object by one. The ++ operator is
nalin [4]

Answer:

Date Date::operator++( int )

{

Date temp = *this;

Increment();

return temp;

}

Explanation:

Of options 1 through 4, only option 4 correctly implement the post increment of the ++ operator.

Interpreting each line of option for and comparing it to other options

Line 1: Date Date::operator++( int )

This declares the data type and its ++ operator

This is same for all options

Line 2: The Date type needs to be declared

In option 4, it was declared correctly as Date temp = *this;  using a pointer variable *this.

Here, option 2 is removed from the list of possible options.

Comparing other options

Line 3: The member increment option needs to be declared after the declaration of the date type variable.

This is correctly declared as Increment();  in option 4

Here, option 3 is removed from the list of possible options.

Comparing other options

Line 4: The value declared variable temp needs to be returned the way it was declared (without pointer indicator)

Hence, option 4 is best appropriate

3 0
3 years ago
Create a project for a sandwich shop. The project, named SalsSandwiches, allows a user to use a ListBox to choose a type of sand
nirvana33 [79]

Answer:

Create a new C# windows application with the name SalsSandwiches. Add the below code in respective file.

Explanation:

See attached images for the source code and output

7 0
3 years ago
Other questions:
  • To create an individual version of a slide, you would click
    9·1 answer
  • You are a project manager tasked to implement a critical application in a reputed bank. A client review indicates that you could
    11·2 answers
  • What component has the job of managing data as it flows into and out of the places it needs to go?
    11·2 answers
  • Which speaker port should you use when connecting a single speaker to a pc?
    6·1 answer
  • It chapter 2 pennywise
    13·1 answer
  • Write a function, sublist, that takes in a list of numbers as the parameter. In the function, use a while loop to return a subli
    13·1 answer
  • How is a technical certificate like a computer-related associate degree?
    12·2 answers
  • you just bought a new hard drive for your computer .you plan to use this as a secondary hard drive to store alll your files. wha
    15·1 answer
  • Please create C program, the task is to implement a function edoublepowerx that has an input parameter x of floating-point value
    11·1 answer
  • Explain the following terms <br><br>copyleft:<br><br>creative Commons:<br><br>GNU/GPL:​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!