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
tangare [24]
3 years ago
14

python 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.
Computers and Technology
1 answer:
Veronika [31]3 years ago
8 0

Answer:

The following are the program in the Python Programming Language.

#get input from the user

val = input("Enter the value: ")

#split the input values

x=val.split()

#declare and initialize two variables to 0

total, l = 0,0

#set for loop

for n in x:

 #coverting into string

 n = int(n)

 #perform addition

 total= total + n

 #check that is l is none or n is greater than l

 if(l is None or n > l):

   #initialize the value of n in l

   l = n

#print the following output

print("Average and maximum value are:", total // len(x), l)

<u>Output</u>:

Enter the value: 10 20 0 5

Average and maximum value are: 8 20

Explanation:

<u>Following are the description of the program</u>.

  • Firstly, declare a variable 'val' in which we get string type input from the user.
  • Again declare two variables and assigned them to 0.
  • Then set the for loop statement, in which we convert the string variable into the integer and perform addition with those converted values. Set the if conditional statement to check that if the variable 'l' is none or 'n' is greater than 'l ' then, assigned the value of the variable 'n' in the variable 'l'.
  • Finally, print the following result with message.
You might be interested in
Renée’s job entails using a company laptop to constantly open other peoples’ workbooks, sorting the data, importing a new sheet
nevsk [136]

she should leave and go somewhere else for a mminute to cool and then come backa nd close tabs.

6 0
2 years ago
PHOTOGRAPHY PLEASE HELP!
BARSIC [14]
1. Portfolios, folders, or drives
2. To make small touch ups and enhance your photos
3. People can steal your photos
4. Because they are trying to capture a story in a photo, and others can change the original intent of their work.
8 0
3 years ago
Mr. Cooper would like to customize his Excel software so his students can create an electronic graph in Excel for their lab repo
Neko [114]
The third one probably
5 0
3 years ago
Andrew is graduating from high school and is very interested in computers and programming. Based on the programming language mar
Anika [276]

Answer:

B. Identify the most popular languages to determine the highest job demand.

Explanation:

You are not here to gain just experience or identify the language that is most compatible with various other languages for various skills. And these programming languages are standards, and hence you are not required to check them for turning completeness tests to meet various programming criteria. The correct option for you will be to identify the most popular languages to determine the highest job demand. And hence, B. is the right option for this question.

5 0
3 years ago
Programmed latching circuits are retentive. This means that if power is interrupted the output will __________ when power is ret
Sloan [31]

Answer:

Option b  (switch to the OFF state)

Explanation:

Since, when the power is interrupted, it cannot be restored.

6 0
3 years ago
Other questions:
  • To keep you from inadvertently moving controls as you work in the IDE, click the form or control, then click the _________ optio
    15·1 answer
  • A franchise restaurant is attempting to understand if customers think their service is good day-to-day by summarizing a series o
    10·1 answer
  • Consider the following code: // Merge mailing list m2 into m1 void merge (MailingList m1, MailingList m2) { for (int i = 0; i &l
    12·1 answer
  • A chief Information Security Officer (CISO) is performing a BIA for the organization in case of a natural disaster. Which of the
    8·1 answer
  • Overview: For the final project in this course, you will assume the role of a training manager at a cybersecurity firm needing t
    9·1 answer
  • Which popular file format loses some of the information from the image? JPEG TIFF RAW NEF
    12·1 answer
  • ¿En qué países se ha implementado un sistema de vigilancia a través de drones?, ¿qué aspectos positivos y negativos ha generado?
    13·1 answer
  • Why do many experts recommand longer time horizonal if you are doing high risk investment
    7·1 answer
  • I WILL MARK BRAINLEST
    7·1 answer
  • Which of the following lines of code would reduce the player’s gold by 100 coins?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!