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
Levart [38]
3 years ago
13

Write a program that will find the smallest, largest, and average values in a collection of N numbers. Get the value of N before

scanning each value in the collection of N numbers.
Computers and Technology
1 answer:
lara31 [8.8K]3 years ago
7 0

Answer:

Program to this  question can be defined as below:

Program:

Num=[] #defining an empty list

count = int(input("Enter total number in the elements: ")) #insert total element

s=0 # defining variable s

print('Enter elements: ')#message

for i in range(1, count+ 1): #loop to calculte sum

   val = int(input())#defining val to collect values

   s=s+val; # defining variable and add values

   avg=s/count; #calculate avg  

   Num.append(val) #add values in list

print("Smallest number: ",min(Num))#print Smallest number

print("Largest number: ",max(Num))#print Largest number

print("Average number: ",avg)# print Average

Output:

Enter total number in the elements: 3

Enter elements:  

8

7

1

Smallest number:  1

Largest number:  8

Average number:  5.333333333333333

Explanation:

In the above program first, define an empty list and use a loop to insert all elements in the list, inside the list an "s" variable is used, to add all elements. In the list and another variable "avg" is used to calculates its average value.

  • In the next line, python min and max, which is inbuilt method.
  • These methods use the print method that prints its maximum, minimum, and average number.    
You might be interested in
When she manages a software development project, Candace uses a program called __________, because it supports a number of progr
alexandr402 [8]

Answer:

PLS programming language supporting.

Explanation:

7 0
3 years ago
Which tab in Microsoft Word provides access to the backstage view?
ivann1987 [24]
The answer is control windows
6 0
3 years ago
Read 2 more answers
The weight of your car will also affect its_____.
Usimov [2.4K]

Answer: C

Explanation:

4 0
3 years ago
Read 2 more answers
Instructions:Select the correct answer.
Luba_88 [7]
<span>A.) system administrator

Hope that helps</span>
8 0
3 years ago
Read 2 more answers
What are the 8 tips for<br>healthy living?​
disa [49]

Answer:

Base your meals on starchy foods.

Eat lots of fruit and vegetables.

Eat more fish.

Cut down on saturated fat and sugar.

Try to eat less salt- no more than 6g a day.

Get active and try to be a healthy weight.

Drink plenty of water

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • What kind of device is a printer? output or input
    13·1 answer
  • Binary code what does this mean I was sick so I don't under stand
    7·2 answers
  • Ar count = 10;
    13·1 answer
  • Some of the more important __________ include anti-virus (and anti-malware), host-based firewall, system hardening (removing unw
    11·1 answer
  • 11)When, if ever, will the geometric average return exceed the arithmetic average return for a given set of returns?A) When the
    6·1 answer
  • Nonverbal messages from the movie it​
    5·2 answers
  • What is the purpose of the Excel Function Reference?
    9·1 answer
  • Site at least 3 articles of impact of internet that affect in our daily lives.
    15·1 answer
  • "write a program to play and score the paper-rock-scissor game. each of two users types in either p, r, or s. the program then a
    6·1 answer
  • Explain with examples the roles of system software and application software?<br>​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!