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
KatRina [158]
4 years ago
10

Write a function that accepts a list as an argument (assume the list contains integers) and returns the total of the values in t

he list.
Computers and Technology
1 answer:
Serga [27]4 years ago
8 0

Answer:

def listSum(mylist):

   sum =0

   for item in range(0,len(mylist)):

       sum=sum+mylist[item]

   print(sum)

Explanation:

Using the Python programming language, I defined a function as listSum that accepts a list as a parameter and returns the sum of the elements in the list.

The most important logic here is defining the range of elements in the list not to exceed the length of the list using the len function. Then using a for statement, we loop through each element and add them up to a sum variable initially assigned the value of 0.

You might be interested in
You'd like to change the minimum password length policy in the default domain policy group policy preference (gpo). What's the b
Naya [18.7K]

The best way to change the minimum password length policy is to open the Group Policy Management Console by running gpmc.msc from CLI.

<h3>What is a password policy?</h3>

A password policy refers to a set of rules and standard that are designed and developed by the data security of an organization, so as to enhance computer security and ensure all password meet the minimum requirements such as:

  • Password length
  • Password maximum age.
  • Password combination

In this scenario, the best way to change the minimum password length policy is to open the Group Policy Management Console by running gpmc.msc from CLI.

Read more on password here: brainly.com/question/3404286

#SPJ12

8 0
2 years ago
Write an algorithm to find the area of a circle of radius r
Bas_tet [7]

Answer:

e=mc^2

Explanation:

4 0
2 years ago
Think of a genre (science, music, math, sports, video games, etc.) and create at least 10 questions. You can decide whether you
mojhsa [17]

<em>Answer:</em>

<em>When listing to studying music or calm music it will help you considerate on a test or any home work that you are doing </em>

<em>Explanation:</em>

<em>Since 2006, two UCF professors neuroscientist Kiminobu Sugaya and world-renowned violinist Ayako Yonetani have been teaching one of the most popular courses in The Burnett Honors College. “Music and the Brain” explores how music impacts brain function and human behavior, including by reducing stress, pain and symptoms of depression as well as improving cognitive and motor skills, spatial-temporal learning and neurogenesis, which is the brain’s ability to produce neurons. Sugaya and Yonetani teach how people with neurodegenerative diseases such as Alzheimer’s and Parkinson’s also respond positively to music. </em>

<em> </em>

<em>“Usually in the late stages, Alzheimer’s patients are unresponsive,” Sugaya says. “But once you put in the headphones that play [their favorite] music, their eyes light up. They start moving and sometimes singing. The effect lasts maybe 10 minutes or so even after you turn off the music.” </em>

<em> </em>

<em>This can be seen on an MRI, where “lots of different parts of the brain light up,” he says. We sat down with the professors, who are also husband and wife, and asked them to explain which parts of the brain are activated by music.</em>

7 0
3 years ago
Ken has discovered that a vice president of his company has been using his computer to send data about a new product to a compet
yaroslaw [1]
Report the person through proper channels
7 0
3 years ago
Can someone give me their opinion on this discussion? Post your discussion please.
GalinKa [24]
Hi!

I have chosen Scenarios A, B and C.

For Scenario A, it DOES make sense to use a template. This is because you will be mass sending thank you letters to your purchasers.

For Scenario B, it DOESN’T make sense to use a template. This is because the letter you are writing will probably just be a one-off letter, and you won’t need to write another one.

For Scenario C, it DOESN’T make sense to use a template. As mentioned above, the report will probably just be a one-off report, so it doesn’t make sense to use a template.

I hope that this helps you out!
5 0
3 years ago
Other questions:
  • Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
    8·1 answer
  • Lionel wants to find images of colonies of Emperor penguins to use for a school project. Which of the following phrases should h
    15·1 answer
  • 9. Differentiate between bolding and highlighting<br>text.<br>(2 marks)​
    15·2 answers
  • It destructs microorganisms in containers
    8·1 answer
  • 1. Write a programme to print the Fees Receipt of English High School Required Inputs Name of the Student Monthly Tuition Fees M
    10·1 answer
  • Globalization is based on <br>​
    10·1 answer
  • The Open Systems Interconnection (OSI) Reference Model: defines standards for many aspects of computing and communications withi
    12·1 answer
  • Select the correct answer
    15·1 answer
  • what is the term for software that is exclusively controlled by a company, and cannot be used or modified without permission?
    6·1 answer
  • List and describe the 3 tasks learners can do in a Technology classroom.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!