Statistics are often calculated with varying amounts of input data. Write a program that takes any number of integers as input, and outputs the average and max.

Answers

Answer 1

Answer:

Explanation:

The following code is written in Python. It is a function that takes in a list of ints as a parameter. It then creates two variables one for sum and for max. It then loops through the list adding all the values to sum and adding only the largest value to max. Then it creates a variable called avg which calculates the average by dividing the variable sum by the number of elements in the list. Finally, it returns both avg and max to the user.

def avg_and_max(my_list):

   sum = 0

   max = 0

   for x in my_list:

       sum += x

       if x > max:

           max = x

   avg = sum / len(my_list)

   return avg, max


Related Questions

To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used

Answers

Answer:

Link Aggregation Control Protocol

Explanation:

Link Aggregation Control Protocol can be used to assist in the formation of port channel bundles of physical links.

Link Aggregation Control Protocol is an IEEE standard defined in IEEE 802.3ad. LACP lets devices send Link Aggregation Control Protocol Data Units (LACPDUs) to each other to establish a link aggregation connection.

what are the qualities of different products that caught your eye and encourage you to buy them​

Answers

Answer:

The qualities of different products that caught your eye and encourage you to buy them​ is described below in detail.

Explanation:

A fantastic method to do this would be to practice shiny colors in any advertisement you publish. This is an old method, but it's a great one. Glowing orange, for example, is sure to hold watching much higher than bland shades like gray. Play throughout here, and apply the color you think illustrates the eye most.

A drop light that does not allow any electrical parts to come in contact with the outer casing of the device is called a:

Answers

Answer:

The right answer is "Double insulated light".

Explanation:

Double insulated led is mostly a sophisticated type of natural light that does not necessitate a terrestrial or planetary correlation. These illuminations could be based on these metals, are indicated in the electrical protection environmental standards that now the construction workers comply with, and therefore are readily accessible about every bedroom.

How important "saving" in every individual?​

Answers

Answer:

The importance of saving money is simple: It allows you to enjoy greater security in your life. If you have cash set aside for emergencies, you have a fallback should something unexpected happen. And, if you have savings set aside for discretionary expenses, you may be able to take risks or try new things.

2. A __________ is a single function that the program must perform in order to satisfy the customer.

Answers

Answer:   A software requirement is a single function that the program must perform in order to satisfy the customer.

Explanation:

A program is a set of instructions or commands that are required to perform a job.  So before programming , we should know what we want our program to do so we can do it and then verify it.

The set of required tasks in our program is called as software requirement.

These are agreed by the customer and the developer before hand. Each software requirement describe a single wanted functionality from our program.

5. Give an example of a database application that has hundreds of users and a very large and complicated database.

Answers

Answer:

IBM DB2

Explanation:

Database Applications are separate applications that do not have a specific database, instead, they are used to be able to manipulate any database that you have access to. One very popular database application that has hundreds of users is IBM DB2. This database application was created by the company IBM which is a multinational company and can even be used to access their own database which is extremely large, and as any database the larger it is the more complicated it is as well since there is more data to sift through

Am giving BRAINLIEST!!!!!!! Assume you have entered the following after a prompt. >>> import time
How would you pause a program for 5 seconds?

Answers

Answer:

time.sleep(5)

Explanation:

Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use

Answers

Question:

Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the gas equation PV = nRT, where P is pressure in Pascals, V is volume in cubic meters, n is number of moles, R is the gas constant 8.3144621 ( J / (mol*K)), and T is temperature in Kelvin.

Answer:

This solution is implemented in C++

double compute_gas_volume(double P, double T, double n){

   double V = 8.3144621 * n * T/P;

   return V;

}

Explanation:

This line defines the function, along with three parameters

double compute_gas_volume(double P, double T, double n){

This calculates the volume

   double V = 8.3144621 * n * T/P;

This returns the calculated volume

   return V;

}

To call the function  from the main, use:

cout<<compute_gas_volume(P,T,n);

Where P, T and n are double variables and they must have been initialized

pls help
Will give brainlest Ashton assigned a string value to a variable. Which program statement should he use?


2bookName = "Brave New World"

Book Name = "Brave New World"

bookName = "Brave New World"

bookName! = "Brave New World"

Answers

Answer:

I think its B bookName! = "Brave New World"

Explanation:

Answer:

B: Book Name = "Brave New World"

Explanation:

A company is completing research and development for software which it is planning to produce in approximately 2 years time. Which of the following assumptions should the company make about the processing speeds of the hardware which will be used to run this software.

Answers

Answer:

true tbh I don't really Know

Timothy is an architect. He needs to create a prototype of a new apartment that his firm is building. Which multimedia software would he use? A. image editing program B. painting program C. animation program D. digital video program E. 3D modeling program

Answers

E. 3D modeling program! This will always been used for architectural designing, a software example would be Archicad.

In the 2018-2019 softball season, Allison hit the ball 28 out of 67 times, this included fouls. What was her percentage
of misses?

Answers

Answer:

Allison missed 58.21% of the times.

Explanation:

The first step is to divide 28 by 67 to get the answer in decimal form:

28 / 67 = 0.4179

Then, we multiplied the answer from the first step by one hundred to get the answer as a percentage:

0.4179 * 100 = 41.79%

Then 100(%) - 41.79(%) = 58.21%

What are the characteristics of desktop alerts in Outlook 2016? Check all that apply.
On-screen notifications will pop up for new emails, meeting invites, and new tasks.
Email pop-ups will display the sender's name, subject, and a small bit of the message.
Reading the pop-up alert is the best way to read email messages.
Desktop alerts cannot be turned off.
O Sound notifications can be customized.

Answers

Answer:

A & B

Explanation:

Answer:

A. On-screen notifications will pop up for new emails, meeting invites, and new tasks.

B. Email pop-ups will display the sender’s name, subject, and a small bit of the message.

E. Sound notifications can be customized.

Explanation:

this is for Outlook 2019

Write a method, public static void selectSort(ArrayList list), which implements a selection sort on the ArrayList of Integer objects list. For example, if the parameter list would be printed as [3, 7, 2, 9, 1, 7] before a call to selectSort, it would be printed as [1, 2, 3, 7, 7, 9] after the method call.

Answers

Answer:

Explanation:

The following code is written in Java and like asked in the question, it is a function that takes in an ArrayList of Integers as a parameter and uses selection sort to sort the array.

public static void selectSort(ArrayList<Integer> list) {

                       for (int i = 0; i < list.size() - 1; i++)

                       {

                               int index = i;

                               for (int j = i + 1; j < list.size(); j++){

                                       if (list.get(j) < list.get(index)){

                                               index = j;

                                       }

                               }

                               int smallerNumber = list.get(index);

                               list.set(index, list.get(i));

                               list.set(i, smallerNumber);

                       }

               }

ELO 3.6 Which type of iSCSI name requires a registered domain name to generate a unique iSCSI identifier?

Answers

Answer:

iSCSI Qualified Name (IQN).

Explanation:

iSCSI is simply an acronym for Internet Small Computer Systems Interface and it is typically an internet protocol (IP) with respect to a storage area network (SAN) standard used essentially for connecting data storage facilities over a transmission control protocol and internet protocol (TCP/IP).

iSCSI Qualified Name (IQN) is a type of iSCSI name that requires a registered domain name to generate a unique iSCSI identifier.

This ultimately implies that, a data storage organization must have a registered domain name in order to be able to generate an iSCSI Qualified Name (IQN). Also, the iSCSI Qualified Name (IQN) is not linked to an internet protocol (IP) address and as such it is considered to be a logical name.

how to promote CPA offers without a website?

Answers

Answer:

Report Promote Marketing For CPA Offer: Article advertising is the same as blog entry advancement. Agree to take some excellent article accommodation destinations and begin submitting encouraging posts. Compose articles that are by one Way or another pertinent to your exclusive CPA offer

Explanation:

:)

2.20 Write an expression involving a three-letter string s that evaluates to a string whose characters are the characters of s in reverse order. If s is 'top', the expression should evaluate to 'pot'.

Answers

Answer:

The program in Python is as follows:

s = input("Three letter string: ")

if(len(s)==3):

    print(s[::-1])

else:

    print("Invalid length")

Explanation:

This prompts the user for a three-letter string

s = input("Three letter string: ")

The following if condition checks if the length of the string is 3. If yes, it reverses and print the reversed string

if(len(s)==3):

    print(s[::-1])

If otherwise, it prints "Invalid length"

else:

    print("Invalid length")

_________________ allows cloud controller to locate instances on separate zones to boost redundancy.

Answers

Answer:

_____Router___ allows the cloud controller to locate instances on separate zones to boost redundancy.

Explanation:

A router, as a networking device, forwards data packets between one computer network and other networks.  With a router, one can use wired and wireless devices to connect to the Internet.  Unlike a modem, which connects the home network to a wider internet, a router can enable the networks to interact with one another without using the Internet.

Plz help doe today 15 points

Answers

Answer:

there nothing in the doc

Explanation:

The following program calculates yearly and monthly salary given an hourly wage. The program assumes a work-hours-per-week of 40 and work-weeks-per-year of 50. Insert the correct number in the code below to print a monthly salary. Then run the program. The monthly salary should be 3333.333... .

Answers

Answer:

The program implemented in Python is as follows:

hourly=float(input("Hourly Wage: "))

print("Annual Rate: "+str(hourly * 40 * 50))

print("Monthly Rate: "+str(round((hourly * 40 * 50/12),2)))

Explanation:

The question is incomplete as the missing code is not given. However, I've written the program from scratch in python.

This prompts the program user for the hourly Wage;

hourly=float(input("Hourly Wage: "))

This calculates and prints the annual rate

print("Annual Rate: "+str(hourly * 40 * 50))

This calculates and prints the monthly rate

print("Monthly Rate: "+str(round((hourly * 40 * 50/12),2)))

Note:

The annual rate is calculated by multiplying the hourly wage to number of hours per week (40) to number of weeks per year (50)

The monthly rate is calculated by [tex]annual\ rate/12[/tex]

Give ways on how to effectively save.​

Answers

Answer:

Explanation:

say goodbye to debt. Monthly debt payments are the biggest money suck when it comes to saving. ...

Cut down on groceries. ...

Cancel automatic subscriptions and memberships.

please help me please i really need helpp so i can pass

Answers

Answer:

Piezoelectric gauge is used to convert charge into measureable electric signal.

Universal serial bus interface allows a computer and flash drive to exchange information.

Analytical balance is used to measure mass

Ultrasonic flow sensors measure the seed of water using ultrasonic waves.

Explanation:

Analytical balance is used to measure mass. An analytical balance is a device that can measure the mass of an object  accurately. It can also measure very small amount of mass with a range between 0.1mg - 0.01mg.

Universal serial bus interface allows a computer and flash drive to exchange information. A Universal Serial Bus (USB) is an interface that allows communication between peripheral devices and a computer. It connects peripheral devices such as mouse, keyboards, printers, scanners, external hard drives and flash drives with the computer.

Piezoelectric gauge is used to convert charge into measureable electric signal. A piezoelectric gauge has a piezoelectric sensor that uses piezoelectric effect to measure changes in pressure, temperature, force and convert these changes into electrical charge.

Ultrasonic flow sensors measure the speed of flowing liquid using ultrasonic waves. It uses sound waves to determine the speed of the liquid.

Write a program that first gets a list of integers from input. That list is followed by two more integers representing lower and upper bounds of a range. Your program should output all integers from the list that are within that range (inclusive of the bounds).

Answers

Answer:

The program in Python is as follows:

mylist = []

num = int(input("Length: "))

for i in range(num):

    inp = int(input(": "))

    mylist.append(inp)

lower = int(input("Lower Bound: "))

upper = int(input("Upper Bound: "))

for i in mylist:

    if i >= lower and i <= upper:

         print(i, end=" ")

Explanation:

This initializes an empty list

mylist = []

The prompts the user for length of the list

num = int(input("Length: "))

The following iteration reads input into the list

for i in range(num):

    inp = int(input(": "))

    mylist.append(inp)

This gets the lower bound of the range

lower = int(input("Lower Bound: "))

This gets the upper bound

upper = int(input("Upper Bound: "))

This iterates through the list

for i in mylist:

This checks for elements of the list within the range

    if i >= lower and i <= upper:

This prints the list element

         print(i, end=" ")

Answer:input_numbers = [int(x) for x in input().split(' ')]

input_range = [int(x) for x in input().split(' ')]

for number in input_numbers:

   if input_range[0] <= number <= input_range[1]:

       print('{}'.format(number), end = ' ')

Explanation:

Write a method that accepts a number of seconds and prints the correct number of hours, minutes, and seconds.

Answers

Answer:

This solution is implemented in Java

public static void timme(int seconds) {

       int hours = seconds/3600;

       System.out.println("Hours: "+hours);

[tex]seconds = seconds - hours * 3600;[/tex]

       int minutes = seconds/60;

       System.out.println("Minutes: "+minutes);

[tex]seconds = seconds - minutes * 60;[/tex]

       System.out.println("Seconds: "+seconds);

   }

   

Explanation:

This method defines the method along with one parameter

public static void timme(int seconds) {

This calculates hours from the seconds

       int hours = seconds/3600;

This prints the calculated hours

       System.out.println("Hours: "+hours);

This calculates the seconds remaining

    [tex]seconds = seconds - hours * 3600;[/tex]

This calculates the minutes from the seconds left

       int minutes = seconds/60;

This prints the calculated minutes

       System.out.println("Minutes: "+minutes);

This calculates the seconds remaining

    [tex]seconds = seconds - minutes * 60;[/tex]

This prints the seconds left    

  System.out.println("Seconds: "+seconds);

   }

To find any information on the Internet, we enter specific keywords into a search engine. What happens next

Answers

Answer:

Answer A

Explanation:

If we assume the modern view of existential import, why is the following syllogism invalid? No computer is made of clay. All computers are electronic devices. Some electronic devices are not made of clay.

Answers

Answer:

because the conclusion is not in agreement with the two premises.

Explanation:

Remember, the term syllogism refers to the form of reasoning that draws its conclusion based on the stated premises. In other words, a conclusion is reached if it satisfies all or part of the premises.

In this case, the statement "No computer is made of clay" and  "All computers are electronic devices" should be inferred to mean, No electronic devices are made of clay" not "Some electronic devices are not made of clay," since the two premises neither suggest that electronic devices are made from clay.

The reason why the given syllogism is invalid is because; The conclusion does not agree with the premise.

We are given two statements as premises;

1) No computer is made of clay

2) All computers are electronic devices

The third statement is the conclusion which states that;

3) Some electronic devices are not made of clay.

Now in syllogism, the conclusion must be in agreement with the two premises.

In this question, the conclusion doesn't agree with the premises because the conclusion says "some electronic devices are not made of clay". Whereas the premise says that no computer which is an electronic device is made of clay.

Since none of the premise suggests that any electronic device is made of clay, then the syllogism is invalid.

Read more about syllogism at; https://brainly.com/question/1622136

Write a method doubleUp that doubles the size of a list of integers by doubling-up each element in the list. Assume there's enough space in the array to double the size.

Answers

Answer:

The solution in Python is as follows:

class myClass:

    def doubleUp(self,doubleList):

         doubleList[:0] = doubleList[::2] = doubleList[1::2] = doubleList[:]

       

newlist =  []

n = int(input("Number of elements: "))

for i in range(n):

    num = int(input(": "))

    newlist.append(num)

   

list = myClass()

list.doubleUp(newlist)

print(newlist)

Explanation:

Start by creating a class

The solution in Python is as follows:

class myClass:

Then define the method doubleUp

    def doubleUp(self,doubleList):

The duplicates is done here

         doubleList[:0] = doubleList[::2] = doubleList[1::2] = doubleList[:]

The program main begins here

This defines an empty list        

newlist =  []

This prompts user for number of elements

n = int(input("Number of elements: "))

The following iteration get the elements of the list

for i in range(n):

    num = int(input(": "))

    newlist.append(num)

   

This defines the instance of the class

list = myClass()

This calls the method

list.doubleUp(newlist)

Lastly, this prints the duplicate list

print(newlist)

Please helpppp. Rearrange the parts of the program to generate two random integers and then ask the user to guess the greatest common divisor.
First part
Second part
Fourth part
Third part

1. from math import gcd
from random import randrange

numA=randrange(6,50,2)

numB = randrange(6,30,2)

if guess == answer:

print("Good job! You are right.")

print("The right answer is",answer)

answer = gcd(numA,numB)
guess = input("Greatest common divisor of " + str(numA) + " and " + str(numB) + "? " )

Answers

Answer:

first part:

from math import gcd  

from random import randrange

second part:

numA=randrange(6,50,2)

numB = randrange(6,30,2)

third part:

answer = gcd(numA,numB)

guess = input("Greatest common divisor of " + str(numA) + " and " + str(numB) + "? " )

fourth part:

if guess == answer:  

print("Good job! You are right.")

print("The right answer is",answer)

Explanation:

got it right on edge

C++ Random Number Generation with a Range The modulus operator can produce random numbers in any range, much like 1 and 10 do. For instance, you could write int random = 1+ (rand()% 100) to produce numbers between 1 and 100.

What programs to generate two random integers?

In the C/C++ computer languages, random number generation is accomplished using the rand() and srand() methods. The srand() value is fixed at 1, therefore the rand() function always produces the same results.

When we run the program, the same random number will be generated each time by the C++ rand() function. The srand (unsigned int seed) function is used to seed the rand() function.

Therefore, The pseudo-random number generation's starting point is set by the srand() function.

Learn more about random integers here:

https://brainly.com/question/15247918

#SPJ2

True or False: Kitchen lighting can be included on a small appliance branch circuit.. Single line text.

Answers

The answers is False

How do you change the order of the slides in your presentation in the slide pane 
Copy and paste
Delete
Drag and drop
Remove

Answers

Drag and drop! Good luck

Answer:

Hold down on your slide number and then pull in the order

Explanation:

Remember push down the pull up

Other Questions
Out of the 20 students in Mrs. Green's class, 8 have a pet. What percent of the students in Mrs. Green'sclass have a pet?The percent of students in Mrs. Green's class that have a pet is _____%. Helpppp plzzzzzzzzzz Michelle ordered 200 T-shirts to sell at the school carnival. She paid $2.80 per shirt, plus 5% of the total order for shipping. When she sells each T-shirt at the carnival, she adds a 150% markup to the total price she paid for the shirt (including the cost of shipping). What is the selling price of each T-shirt? Mr. Parkers class has created a list of different ways heat transfer happens in Earths systems. The list is shown here. A catcher in a baseball game stops a pitched ball that was originally moving at 44 m/s over a distance of 12.5 cm. the mass of the ball is 0.15 kg. what is the average force that the glove imparts to the ball during the catch Which conditions in Europe contributed to the rise of totalitarianism? What do we say "who " in Sanskrit Paula had read 25% of the total pages in a book she is reading for english class. Paula had read 84 pages. Write an equation to determine how many pages are in the book and how many pages she has read. Please help with this question. Picture is linked How might Amanda Gorman story be inspirational to you? What about Amanda Gorman poem can you relate to meditation and staying calm and also resolving conflicts? Poem called the hill we climb. If you answer correctly with an explanation i will mark you as brainliest! Help please will mark brainlist What is 82,711 in expandedform ) Where, when, and by whom was Lutheranism created? Please Help Me 1. What are three different ways that humans use the land as a resource?2. How do trees help maintain the stability of land resources?3. Make a claim for reasons not to build homes and roads on a wetland?4. Suppose you are a farmer who has just purchased 200 acres of land. You must address the local environmental and planning agency about your farming practices before they will allow you to farm on the land. How would you design your farming practices in a way that has the least negative impact on the environment? Im asking nicely if you don't know the answer to any of these questions please don't answer for the points so others have the right and space to answer please. Thank You!! Which of these is a type of active transport?O A. OsmosisO B. EndocytosisO C. Facilitated diffusionO D. Simple diffusion Explain the The authors purpose of American Flag Heroine PLZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ HELPPPPPPPPPPPP MEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE I HATE PEOPLE SKIPPINGMY QUESTION!!!Write a summary using all these topicsa. Why did the continental army first cross to the Pennsylvania shore?b. Describe the condition of the Continental Army at the beginning.c. What was George Washingtons proposal for Christmas Day 1776?d. Why was the Battle of Trenton different than the others that the Continental Army fought?e. What was the outcome of the Battle of Trenton? Explain. Please help thanks :)))) The number of terms the series above is What must be present in order forelectricity to flow?A. positive and negative chargesB. an electrical outletC. NeutronsD. water