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
Alex_Xolod [135]
3 years ago
10

Write a function, AvgList, that takes a single argument, a list, and returns the average (mean) of the numbers in the list. You

may assume that all elements of the list are numeric (int or float), and that the list has at least one element. Hints: Use the function SumList that you wrote above. Use the built-in function len to get the number of elements in the list.
Computers and Technology
1 answer:
8_murik_8 [283]3 years ago
3 0

Answer:

Answered below

Explanation:

//Programmed in Java

public double avgList(int [] nums){

int I;

double sumOfNumbers = 0;

double averageOfNumbers = 0;

//Loop over to sum all elements in the list.

for(I = 0; I < nums.length; I++){

sumOfNumbers += nums[I];

}

//Calculate the average

averageOfNumbers = sumOfNumbers/ nums.length;

return averageOfNumbers;

}

You might be interested in
What may happen if a large number of computer users are attempting to access a web page
Misha Larkins [42]
If the computers where all trying to access the same website then that website might be slow to load or it could crash all together.
7 0
3 years ago
All of the following items could be too expensive for someone with only a high school degree to afford except
Papessa [141]
This sounds like a multiple choice answer can I have 4 choices to pick?
7 0
3 years ago
Which of the following is an advantage of batch processing?
alina1380 [7]

Answer:

it can balance computing resources by time

Explanation:

this this is as it involves multiprogramming

8 0
4 years ago
Which sentence in the passage shows an effective way to protect your document from misuse? Claire has saved her research paper o
goblinko [34]

Answer: She sets an access password while saving the file. hope this helps!!!!

Explanation:

4 0
3 years ago
2. When was the Antikythera mechanism discovered? What year? <br>​
Vlad [161]

Answer: 1901

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Please help!
    10·1 answer
  • How many different messages can be transmitted in n microseconds using three different signals if one signal requires 1 microsec
    12·1 answer
  • Which line of code will print I like to code on the screen? print("I like to code") print(I like to code) print("I LIKE TO CODE"
    5·2 answers
  • Renee's creating a plan for her business's information system. What should she do after she determines the goals for her busines
    10·1 answer
  • What unit is used to describe the smallest amount of bitcoin?
    13·1 answer
  • What would be the state of the following list after each of the first four passes in a Bubble sort, sorting into ascending seque
    15·2 answers
  • Assignment 1 is to write a program that will write the lyrics to "X number of beers on the wall". Use only the main method. Prom
    11·1 answer
  • Helppppp mee eeeee eee
    14·2 answers
  • give the difference between functional and functional tools in the middle of to the circle give importance​
    10·1 answer
  • Read the following statements and select the
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!