answer.
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
yuradex [85]
2 years ago
4

Write the definition of a function named sum_list that has one parameter, a list whose elements are of type int. The function re

turns the sum of the elements of the list as an int.
Computers and Technology
1 answer:
Mashcka [7]2 years ago
4 0

Answer:

The code to the given question can be given as:

Code:

def sum_list(a):    #define function.

   return sum(a)  # return sum of elements.

Explanation:

In the above python programming language code firstly we define a function that is "sum_list()" to define any function we use the def keyword.

In this function, we pass one parameter that is "a" add all elements in the list. To add this number we use the sum function it is the inbuilt function that returns the sum of the elements of the list as an int.

You might be interested in
Which of the following is a collection of unprocessed items, which can include text, numbers, images, audio, and video?A. DataB.
Tema [17]

Answer:

Option A is the correct answer for the above question.

Explanation:

Data can be defined as raw fact which can be useful when it will be processed. The processed data can be formed as information. The data can be anything. It can b e text or audio or images or video. The above question asked about the term which is an unprocessed item and can form information after processing. Then the answer is Data which stated from the option A. So Option A is the correct answer while the other is not because--

  • Option B states about instruction which is useful to process the data.
  • Option C states about Programs that can be formed when one or more instruction is grouped.
  • Option D states about the information that the user can get after processed the data.

6 0
2 years ago
As in algebra, you can use brackets to override the order of operations Excel follows to perform formula calculations. True or f
sertanlavr [38]

Answer:

false

Explanation:

parasynthesis is used to change the order of priority.

6 0
2 years ago
Java Programming home > 1.14: zylab training: Interleaved input/output Н zyBooks catalog Try submitting it for grading (click
Andru [333]

Answer:

The following are the code to this question:

code:

System.out.println(x);  //use print method to print value.

Explanation:

In the given question, it simplifies or deletes code in the 11th line. This line has a large major statement.  

In the case, the tests fail because only 1 line of output is required by the tester, but two lines are obtained instead.

It's to demonstrate that the input/output or testing requirements function throughout the model.

5 0
2 years ago
ArgumentException is an existing class that derives from Exception; you use it when one or more of a method’s arguments do not f
dybincka [34]

Answer:

The C# code is given below

Explanation:

using System;

public class SwimmingWaterTemperatur

{

public static void Main()

{

while(true){

Console.Write("\nPlease enter the water temperature : ");

int x = Int32.Parse (Console.ReadLine());

try{

if(CheckComfort(x)){

Console.Write(x+" degrees is comfortable for swimming.");

}else{

Console.Write(x+" degrees is not comfortable for swimming.");

}

}catch(Exception ex){

Console.WriteLine(ex);

}

}

}

public static Boolean CheckComfort(int temp){

if(temp>=70 && temp<=85){

return true;

}else if(temp>=32 && temp<=212){

return false;

}else{

throw new ArgumentException("Value does not fall within the exptected range.");

}

}

}

7 0
2 years ago
A layer 2 switch is used to switch incoming frames from a 1000base-t port to a port connected to a 100base-t network. which meth
fredd [130]
<span>Shared memory buffering would work best. This would give the ports the best allocation of resources, using only those that are the most active and best allocated for the size of the frames being transmitted in the current traffic. In addition, any port can store these frames, instead of being specifically allocated as per other types of memory buffering.</span>
7 0
2 years ago
Other questions:
  • Define a function PyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the vo
    7·2 answers
  • Develop an EER model for the following situation using the traditional EER notation, the Visio notation, or the subtypes inside
    8·1 answer
  • What types of messages flow across an SDN controller’s northbound and southbound APIs? Who is the recipient of these messages se
    15·1 answer
  • To be eligible for the leadership training program offered by the office, a student must have at least 2 years of post-secondary
    9·1 answer
  • C++
    8·1 answer
  • Information systems cannot solve some business problems. Give three examples and explain why technology cannot help.
    11·1 answer
  • Write a program that reads the lengths of the sides of a triangle from the user. Compute the area of the triangle using Heron's
    8·1 answer
  • When should a developer begin thinking about scalability? 1 during the design phase 2during testing 3when traffic increases by 2
    14·1 answer
  • Describe the ways in which a computer-aided design (CAD) drawing makes the details of an image easier to understand.
    11·2 answers
  • What does NOT match with Agile Manifesto?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!