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. Ex: If the input is: 15 20 0 5 the output is: 10 20 Note: For output, round the average to the nearest integer.

Answers

Answer 1

Answer:

txt = input("Enter numbers: ")

numbers = txt.split(" ")

total = 0

max = 0

for i in numbers:

     total = total + int(i)

     if(int(i)>max):

           max = int(i)

print(round(total/len(numbers)))

print(max)

Explanation:

This solution is implemented using Python programming language

This prompts user for input

txt = input("Enter numbers: ")

This splits user input into list

numbers = txt.split(" ")

The next two line initialize total and max to 0, respectively

total = 0

max = 0

This iterates through the list

for i in numbers:

This sum up the items in the list (i.e. user inputs)

     total = total + int(i)

This checks for the maximum

     if(int(i)>max):

           max = int(i)

This calculates and prints the average

print(round(total/len(numbers)))

This prints the max

print(max)

Answer 2

Answer:

txt = input()

numbers = txt.split(" ")

total = 0

max = 0

for i in numbers:

    total = total + int(i)

    if(int(i)>max):

          max = int(i)

print(round(total/len(numbers)), '', end="")

print(max)

Explanation:

I just added to the end so that the Max of 10 20 is on the same line with space


Related Questions

which type of cisco access lists can restrict ip traffic entering or leaving a router's interface based only on the source ip address?

Answers

The type of cisco access lists that can restrict ip traffic entering or leaving a router's interface based only on the source ip address is Standard IP.

What is an IP address standard?

The IP addresses used by most residential networks begin with 192.168. Typically, the router's IP address will be something like 192.168.1.1 or 192.168.2.1.

Therefore, one can say that the degree of protection offered by an enclosure for electrical equipment with a rated voltage not exceeding 72.5 kV is categorized by the IP rating or IP code. This standard establishes different levels of sealing performance against "ingress," or entry of foreign objects like tools, dirt, and liquid water.

Learn more about cisco access  from

https://brainly.com/question/29489223
#SPJ1

Which of the following queries can have a fully Meets result?

Answers

Answer: we need the awnser key

Explanation:

A pitch is used to bury your screenplay? True or false

Answers

The correct answer for your question would be true

The____ feature in the Camera Raw dialog box can be used to bring out any deep colors in an image.

Answers

Answer: elg

Explanation:

the open function accepts a string argument representing a path/file name and returns a string containing the file's data.

Answers

False, the open function does not take as an input a string specifying a path or file name and instead returns a string containing the contents of the file.

Which expression can tell if num contains an even number?

You may determine whether any number is evenly divisible by 2 by using the modulo operator with a modulus of 2. It is an even number if it is evenly divisible. If num is even, num% 2 will equal 0, and if num is odd, num% 2 will equal 1.

What happens when you run the turtle graphics command turtle left 40?

The turtle rotates 40 degrees to the left. The upper left corner of the Turtle Graphics window is where a turtle is initially located.

To know more about string visit :-

https://brainly.com/question/27832355

#SPJ1

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.

Write a program that reads integers userNum and divNum as input, and output the quotient (userNum divided by divNum). Use a try block to perform the statements. Use a catch block to catch any ArithmeticException and output an exception message with the getMessage() method. Use another catch block to catch any InputMismatchException and output an exception message with the toString() method. Note: ArithmeticException is thrown when a division by zero happens. InputMismatchException is thrown when a user enters a value of different data type than what is defined in the program. Do not include code to throw any exception in the program.

Answers

The program is an illustration of exceptions

Exceptions are used to manage programs from crashing, when they encounter errors.

The program in Java, where comments are used to explain each line is as follows:

import java.util.*;

public class Main {

   public static void main(String[] args) {

       //This creates a Scanner object

       Scanner input = new Scanner(System.in);

       //This gets input for userNum

       int userNum = input.nextInt();

       //This gets input for divNum

       int divNum = input.nextInt();

       //This opens the InputMismatchException try catch

       try {

           //This opens the ArithmeticException try catch

           try{

               //This prints the division of userNum by divNum

               System.out.print(userNum/divNum);

           }

           //If divNum is 0, this catches the exception

           catch (ArithmeticException e){

               System.out.println(e.getMessage());

           }  

        }  

        //If the inputs are not integers, this catches the exception

        catch (InputMismatchException ex) {

           System.out.println(ex.getMessage());

        }

  }

}

Read more about exceptions at:

https://brainly.com/question/6864640

What is it called when there is stored energy in the battery after an accident that has caused damage to the protective case or wiring harness?
A) Stranded energy
B) Explosive energy
C) Lost energy
D) Entrapped energy

Answers

B) Explosive energy is when there is stored energy in the battery after an accident that has caused damage to the protective case or wiring harness.

Is the energy stored when released may cause serious accidents or physical damage?

Stored energy are known to be any form of mechanical, gravitational, hydraulic that is known to be  energy stored in machines as well as in  equipment.

Stored energy hazards if released accidentally can cause serious injury.

Therefore, B) Explosive energy is when there is stored energy in the battery after an accident that has caused damage to the protective case or wiring harness.

Learn more about energy from

https://brainly.com/question/13881533

#SPJ1

pls Which of the following statements is false? a. Having a first aid kit in an office is necessary b. Accidents happen, so it is not necessary to prepare for them c. Your company does need an emergency action plan d. OSHA inspects workplaces to look for unsafe conditions Please select the best answer from the choices provided A B C D

Answers

I thinks it’s B if not I’m sorry:)

The statement that is false is that Accidents happen, so it is not necessary to prepare for them.

What is accident?

The definition of an accident is that it is an unexpected event that occurs that is known to have not being planned.

Note that The statement that is false is that Accidents happen, so it is not necessary to prepare for them and it is false because it is not good to prepare for it as one will be in constant fear always.

Learn more about Accidents from

https://brainly.com/question/16798121

#SPJ2

by applying styles formats are being applied ?
A. The same
B. Different
C. Various
D. Similar

Answers

Answer:

A

Explanation:

The same formats are being applied.

Answer:

A

Explanation:

Let's take the letters in a keyboard. If I were to type a document; there are several word format I can chose like Calibre, Times New Roman, Gothic etc. However for each word format I can make the words bold or italicized which are styles.

What does influence mean in this passage i-Ready

Answers

In the context of i-Ready, "influence" refers to the impact or effect that a particular factor or element has on something else. It suggests that the factor or element has the ability to shape or change the outcome or behavior of a given situation or entity.

In the i-Ready program, the term "influence" could be used to describe how various components or aspects of the program affect students' learning outcomes.

For example, the curriculum, instructional methods, and assessments implemented in i-Ready may have an influence on students' academic performance and growth.

The program's adaptive nature, tailored to individual student needs, may influence their progress by providing appropriate challenges and support.

Furthermore, i-Ready may aim to have an influence on teachers' instructional practices by providing data and insights into students' strengths and areas for improvement.

This can help educators make informed decisions and adjust their teaching strategies to better meet their students' needs.

In summary, in the context of i-Ready, "influence" refers to the effect or impact that different elements of the program have on students' learning outcomes and teachers' instructional practices. It signifies the power of these components to shape and mold the educational experiences and achievements of students.

For more such questions element,Click on

https://brainly.com/question/28565733

#SPJ8

If you are working in a word-processing program and need to learn about its features, the best place to get assistants is from the ________.
A. application's help menu
B. desktop
C. toolbar
D. start menu

Answers

Answer:

A

Explanation:

plz mark me brainlies

Answer:

A. Application's help menu

Explanation:

What kind of variable is measured using 2 different values

Answers

A variable that is measured using two different values can be classified as a categorical variable or a binary variable.

Depending on the nature of the values, a variable can be classified as:

1)Categorical Variable: If the two different values represent distinct categories or groups, the variable is considered categorical. In this case, the variable can take on only one of two possible values.

Examples include gender (male/female), presence/absence of a certain trait, yes/no responses, or any other classification with mutually exclusive categories.

2)Binary Variable: If the two different values represent two distinct outcomes or states, the variable can be classified as a binary variable. Binary variables are often used in statistics, machine learning, and hypothesis testing.

Examples include success/failure, true/false, 1/0, or positive/negative results.

It's important to note that the distinction between categorical and binary variables lies in the nature of the values and the underlying meaning they convey.

Categorical variables can have more than two categories, while binary variables specifically refer to variables with only two possible values.

For more questions on variable

https://brainly.com/question/28248724

#SPJ8

. What projects would Excel best be used for?

Answers

Answer:

Projects that require spreadsheet organization and/or calculations between data

Explanation:

That is why Excel is a spreadsheet program

Last one, this is fashion marketing and I need to know the answer to get the 80%

Last one, this is fashion marketing and I need to know the answer to get the 80%

Answers

Answer:

D. It requires that each item of stock is counted and recorded to determine stock levels

Explanation:

A perpetual system of inventory can be defined as a method of financial accounting, which involves the updating informations about an inventory on a continuous basis (in real-time) as the sales or purchases are being made by the customers, through the use of enterprise management software applications and a digitized point-of-sale (POS) equipment.

Under a perpetual system of inventory, updates of the journal entry for cost of goods sold or received would include debiting accounts receivable and crediting sales immediately as it is being made or happening.

Hence, an advantage of the perpetual system of inventory over the periodic system of inventory is that, it ensures the inventory account balance is always accurate provided there are no spoilage, theft etc.

The following are the characteristic of a perpetual inventory system;

I. It is the most popular choice for modern business.

II. Inventory is updated in near real-time.

III. It provides up-to-date balance information and requires fewer physical counts.

What happens if you have two values with no operator between them

Answers

In Computer programming, if you have two values that has no operator between them, you would experience a syntax error.

What is a syntax error?

A syntax error can be defined as a type of error that typically occurs due to mistakes in the source code of a program such as:

Spelling of words.Punctuation errorsIncorrect labelsSpacing

This ultimately implies that, a misplacement of punctuation or spacing in a command during programming that causes the source code of a program to stop running is most likely a syntax error.

In conclusion, we can infer and logically deduce that if you have two values that has no operator between them, you would experience a syntax error in computer programming.

Read more on computer programming here: brainly.com/question/25619349

#SPJ1

In the graph shown here, by what percentage are the number of people in computer occupations in general projected to increase?


21%

26%

10%

12%

In the graph shown here, by what percentage are the number of people in computer occupations in general

Answers

The number of people in computer occupations in general is projected to increase at 12%

The chart

Reading the charts, we have the following entries

Software developer applications = 26%Software developer = 21%Computer occupations = 12%Software developers, system software = 10%

Using the above entries, we can conclude that:

The number of people in computer occupations in general is projected to increase at 12%

Read more about bar charts at:

https://brainly.com/question/25069221

Can anyone do this I can't under stand

Can anyone do this I can't under stand
Can anyone do this I can't under stand
Can anyone do this I can't under stand
Can anyone do this I can't under stand
Can anyone do this I can't under stand

Answers

Answer:

I think u had to take notes in class

Explanation:

u have yo write 4 strings

Your company has been assigned the 194.10.0.0/24 network for use at one of its sites. You need to calculate a subnet mask that will accommodate 60 hosts per subnet while maximizing the number of available subnets. What subnet mask will you use in CIDR notation?

Answers

To accommodate 60 hosts per subnet while maximizing the number of available subnets, we need to use a subnet mask that provides enough host bits and subnet bits.

How to calculate

To calculate the subnet mask, we determine the number of host bits required to accommodate 60 hosts: 2^6 = 64. Therefore, we need 6 host bits.

Subsequently, we determine the optimal quantity of subnet bits needed to increase the quantity of accessible subnets: the formula 2^n >= the amount of subnets is used. To account for multiple subnets, the value of n is set to 2, resulting in a total of 4 subnets.

Therefore, we need 2 subnet bits.

Combining the host bits (6) and subnet bits (2), we get a subnet mask of /28 in CIDR notation.

Read more about subnet mask here:

https://brainly.com/question/28390252

#SPJ1

Name some areas in which computer are being used​

Answers

Answer:

Computers play a role in every field of life. They are used in homes, business, educational institutions, research organizations, medical field, government offices, entertainment, etc.

Explanation:

Home

Computers are used at homes for several purposes like online bill payment, watching movies or shows at home, home tutoring, social media access, playing games, internet access, etc. They provide communication through electronic mail. They help to avail work from home facility for corporate employees. Computers help the student community to avail online educational support.

Medical Field

Computers are used in hospitals to maintain a database of patients’ history, diagnosis, X-rays, live monitoring of patients, etc. Surgeons nowadays use robotic surgical devices to perform delicate operations, and conduct surgeries remotely. Virtual reality technologies are also used for training purposes. It also helps to monitor the fetus inside the mother’s womb.

Entertainment

Computers help to watch movies online, play games online; act as a virtual entertainer in playing games, listening to music, etc. MIDI instruments greatly help people in the entertainment industry in recording music with artificial instruments. Videos can be fed from computers to full screen televisions. Photo editors are available with fabulous features.

Industry

Computers are used to perform several tasks in industries like managing inventory, designing purpose, creating virtual sample products, interior designing, video conferencing, etc. Online marketing has seen a great revolution in its ability to sell various products to inaccessible corners like interior or rural areas. Stock markets have seen phenomenal participation from different levels of people through the use of computers.

Education

Computers are used in education sector through online classes, online examinations, referring e-books, online tutoring, etc. They help in increased use of audio-visual aids in the education field.

Government

In government sectors, computers are used in data processing, maintaining a database of citizens and supporting a paperless environment. The country’s defense organizations have greatly benefitted from computers in their use for missile development, satellites, rocket launches, etc.

Banking

In the banking sector, computers are used to store details of customers and conduct transactions, such as withdrawal and deposit of money through ATMs. Banks have reduced manual errors and expenses to a great extent through extensive use of computers.

Business

Nowadays, computers are totally integrated into business. The main objective of business is transaction processing, which involves transactions with suppliers, employees or customers. Computers can make these transactions easy and accurate. People can analyze investments, sales, expenses, markets and other aspects of business using computers.

Training

Many organizations use computer-based training to train their employees, to save money and improve performance. Video conferencing through computers allows saving of time and travelling costs by being able to connect people in various locations.

Arts

Computers are extensively used in dance, photography, arts and culture. The fluid movement of dance can be shown live via animation. Photos can be digitized using computers.

Science and Engineering

Computers with high performance are used to stimulate dynamic process in Science and Engineering. Supercomputers have numerous applications in area of Research and Development (R&D). Topographic images can be created through computers. Scientists use computers to plot and analyze data to have a better understanding of earthquakes.

Malaysia..HP,Lenovo,dell

India,Asser,Asus

apple,ibm, Microsoft

PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MY QUESTION WHICH IS DUE TODAY!!!!ANSWER THEM ALL PLZ

DIABETES: What causes this condition? *

DIABETES: What are the symptoms of this condition? *


DIABETES: Does this condition explain why Elisa may be tired? (Why or why not?) *

DIABETES: Which molecule is most likely affected by this condition: oxygen, glucose, or amino acids? *

ANEMIA: What causes this condition? *

ANEMIA: What are the symptoms of this condition? *

ANEMIA: Does this condition explain why Elisa may be tired? (Why or why not?) *


ANEMIA: Which molecule is most likely affected by this condition: oxygen, glucose, or amino acids? *

Answers

Answer:

Explanation:

Being overweight, eating unhealthy, and not exercising can cause diabetes.

Some symptoms of diabetes are being sleepy, being very thirsty, losing weight without trying to, being very hungry, having dry skin, and your hands or feet being numb are some symptoms.

This conditions does explain why Elsa may be tired because tiredness is a symptom of diabetes.

Glucose is most likely affected by diabetes.

Having a shortage of iron in your body causes anemia

Symptoms of anemia are weakness, fatigue, shortness of breath, pale skin, chest pain, and dizziness.

Anemia may be the reason Elisa is tired because it causes fatigue and weakness.

Oxygen is most likely affected by anemia.

When Jenna borrows her dad's office chair, it's too big for her, so her feet dangle and don't reach the floor—which can cause what?

A: eye strain

B: carpal tunnel syndrome

C: a repetitive motion injury

D: slouching posture

Answers

Answer:

D

Explanation:

Answer:

B: carpal tunnel syndrome

Explanation:

YYou have to have your hand on the ddesk.


When you check your hard drive to see how much space is available, you are checking your
O primary memory
O secondary storage
O tertiary storage
O primary storage

Answers

Answer:

secondary storage

find four
reasons
Why must shutdown the system following the normal sequence

Answers

If you have a problem with a server and you want to bring the system down so that you could then reseat the card before restarting it, you can use this command, it will shut down the system in an orderly manner.

"init 0" command completely shuts down the system in an order manner

init is the first process to start when a computer boots up and keep running until the system ends. It is the root of all other processes.

İnit command is used in different runlevels, which extend from 0 through 6. "init 0" is used to halt the system, basically init 0

shuts down the system before safely turning power off.

stops system services and daemons.

terminates all running processes.

Unmounts all file systems.

Learn more about  server on:

https://brainly.com/question/29888289

#SPJ1


When you want to add a chart to your Word Document or PowerPoint Presentation, which of the following opens to allow you to input your information?

a. PowerPoint® presentation

b. Access table

c. Another Word document

d. Excel spreadsheet

Answers

Answer:

d. Excel spreadsheet

Explanation:

When you want to add a chart to a Word Document or PowerPoint Presentation, you can use an Excel spreadsheet to input your data and create the chart. Excel is a powerful tool for creating and managing data, and its charting features allow you to easily create professional-looking charts that can be easily inserted into your Word or PowerPoint documents.

To create a chart in Excel, you can follow these steps:

Open Excel and enter your data into a worksheet.Select the data you want to include in the chart.Click the Insert tab and select the type of chart you want to create.The chart will be inserted into your worksheet and you can customize it by adding labels, changing the colors, and applying other formatting options.Once you are satisfied with the appearance of your chart, you can copy it and paste it into your Word or PowerPoint document.

Using Excel to create your charts is a convenient and easy way to add professional-looking visuals to your documents.

Which of the following is true about media production? A. All media elements contain a certain type of editorial viewpoint. B. Producing a media text involves both print and images C. Every type of media has a different set of tools and devices available. D. Media producers are all trying to confuse their audience

Answers

Answer:

C

Explanation:

Every form of media has different resources.

Anyone down to play gta later i play on ps4?

Answers

Answer:

ok

Explanation:

user daboi1001001

In which of the following situations must you stop for a school bus with flashing red lights?

None of the choices are correct.

on a highway that is divided into two separate roadways if you are on the SAME roadway as the school bus

you never have to stop for a school bus as long as you slow down and proceed with caution until you have completely passed it

on a highway that is divided into two separate roadways if you are on the OPPOSITE roadway as the school bus

Answers

The correct answer is:

on a highway that is divided into two separate roadways if you are on the OPPOSITE roadway as the school bus

What happens when a school bus is flashing red lights

When a school bus has its flashing red lights activated and the stop sign extended, it is indicating that students are either boarding or exiting the bus. In most jurisdictions, drivers are required to stop when they are on the opposite side of a divided highway from the school bus. This is to ensure the safety of the students crossing the road.

It is crucial to follow the specific laws and regulations of your local jurisdiction regarding school bus safety, as they may vary.

Learn more about school bus at

https://brainly.com/question/30615345

#SPJ1

Which character is midway between the 3rd character from left and 6lh character from rights

a. 2
b. 3 ANS
c. 8
d. Y

Answers

Answer:

D

Explanation:

In this Bash looping construct, you want to print integers from 0 to 5, one integer per line. What keyword should replace the blank (__________) in the code

Answers

The  "For" keyword that should replace the blank  in the code

What are Python keyword?

In Python, there are found to be thirty-five keywords. Some of them are:

And Continue For Lambda Try, etc.

The for Keyword that is known to be one of the most common loop in Python is said to be for loop. It is designed by putting the Python keywords for and in.

Learn more about Python keyword from

https://brainly.com/question/13259727

Other Questions
What is the object displacement over the 9 seconds interval Which best describes the causes of a thunderstorm? A. cool, moist air near Earths surface and an unstable atmosphere B. cool, dry air near Earths surface and an unstable atmosphere C. warm, moist air near Earths surface and an unstable atmosphere D. warm, dry air near Earths surface and an unstable atmosphere Tesco Inc. and MW Company exchanged like-kind production assets. Teco's asset had an $80,000 FMV and $53,900 adjusted tax basis, and MW's asset had an $87,500 FMV and a $28,100 adjusted tax basis. Teco paid $7,500 cash to MW as part of the exchange. Which of the following statements is false?A. Tescos realized gain is $26,100 and recognized gain is 0.B. MW's realized gain is $59,400 and recognized gain is $7,500.C. Tescos basis in its newly acquired asset is $61,400.D. MW's basis in its newly acquired asset is $35,600. New innovations of the 1900's included all of the following (choose all that apply) a.city planning b.newspapers and photography c.skyscrapers d.electricity operated public transportation The following activities and body conditions affect blood pressure by changing one of the two listed factors. Drag the appropriate physiological changes to their respective bins. View Available Hint(s) blood donation smoking high-altitude living increased sympathetic activity excessive sweating Total Peripheral Resistance Blood volume 4. In parallelogram LMNP, Mariam is a waitress at a restaurant. Each day she works, Mariam will make a guaranteed wage of $30, however the additional amount that Mariam earns from tips depends on the number of tables she waits on that day. From past experience, Mariam noticed that she will get about $9 in tips for each table she waits on. How much would Mariam expect to earn in a day on which she waits on 19 tables? How much would Mariam expect to make in a day when waiting on t t tables? What does it mean when your taxes are being reviewed. John made a trip to the train station andback. On the trip there he drove 32 km/hand on the return trip he went 40 km/h.How long did the trip there take if thereturn trip took four hours? Why did Odysseus get himself tie to the ship and not put wax into his ears? NO LINK PLS construct the particular solution to the ordinary differential equation y2y y= et t2 1. using convolutions! compute the convolutions explicitly! no credit is different method is used! Solve:3) 4(x - 3) = 20Ans.IStep by step please The federal government, through its control over the American Medical Association, held the physician supply constant for most of the 20th century. True or false? A piano tuner stretches a steel piano wire with a tension of 765 N. The steel wire has a length of 0.900 m and a mass of 6.75 g. A Review Constants What is the frequency fi of the string's fundamental mode of vibration? this filmmaker explored psychology/metaphysical issues in the '50's:A. Akiro KurosawaB. Sataylit RayC. Ingmar Bergman how does american public opinion most conclusively show support of a president Consider a rectangle with width of x units and an area of 10 square units. The length l of the rectangle can be modeled by the function l(x)=10/x. Suppose the width of the rectangle increases 1 unit while the area remains constant. Which graph models the length of the new rectangle What quantity of heat is required for an Isothermal Expansion? Positive None O Negative Heat The right triangle on the right is a scaled copy of the right triangle on the left. Identify the scale factor. Express your answer in simplest form. 20 6 6 20 What is the gravitational force acting on a 70.0 kg object standing on the Earths surface? The radius of the earth is 6.371 x 106 m and the mass is 5.972 x 1024 kg.