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
storchak [24]
3 years ago
15

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.
Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
4 0

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)

You might be interested in
What is a principle of DevOps?​
solong [7]

Answer:

the main principles of DevOps are automation, continuous delivery, and fast reaction to feedback. You can find a more detailed explanation of DevOps pillars in the CAMS acronym: Culture represented by human communication, technical processes, and tools.

4 0
3 years ago
Answer the following questions:
Alika [10]

Answer:

nasaan po yung tanongkkkkk

8 0
3 years ago
You right-click a Server Core server in Server Manager and click Computer Management. You see an error indicating that the serve
Anarel [89]

Answer:

Configure Windows Firewall on the remote computer.

Explanation:

3 0
3 years ago
Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operation
Natasha_Volkova [10]

Answer:

22

Explanation:

1. We are going to have at hand 32 Enqueue Operation, with 10 from front and 15 dequeue and 5 empty queue operation

2. You dequeued total number of 15-5 =10 elements since 5 dequeue did not change the state of the queue, so invariably 10 dequeue is done.

3. Next is to enqueued a total of 32 elements.

Enqueue Operation do not change the state(and Size) of the queue, and can be ignored.

4. To arrive at the Total Size of queue, we will have 32-10 = 22 at the end

Answer : 22 because its a 5 dequeue Operations.

6 0
3 years ago
What is the name of situation where the same data is stored unnecessarily at different places?
Delicious77 [7]

Answer:

Data redundancy.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.

Data redundancy is the name of situation where the same data is stored unnecessarily at different places.

Simply stated, data redundancy can be defined as a condition which typically involves storing the same data in multiple storage locations. Thus, data redundancy connotes the unnecessary repetition of the same piece of data (informations) either deliberately or for some specific reasons.

3 0
3 years ago
Other questions:
  • The code selection above is taken from the Color Sleuth activity you just completed. This selection would count as an abstractio
    12·1 answer
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • Prevent a page break in the final paragraph of this document by keeping the lines together
    10·1 answer
  • What is the full form of w3c
    13·1 answer
  • ¿por que la toria de lamarck sobre el alargamiento del cuello de las jirafas por el esfuerzo continuado no pasara a sus descendi
    10·1 answer
  • What are the differences between the various EHRs?
    9·1 answer
  • Sometimes news organizations have biasis because
    5·1 answer
  • 8
    7·1 answer
  • What is best defined as a phishing email that is targeted directly at you?.
    14·1 answer
  • Identify a characteristic that is a disadvantage of cloud-based hosting.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!