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
Choose the word that best completes this sentence. You should post safe load _________ for each floor and keep aisles and passag
erica [24]
You should post safe load limits for
3 0
3 years ago
Read 2 more answers
Black and white squares codehs, i need the whole code (40 points for correct answer)
ludmilkaskok [199]

Answer:

speed(0)

penup()

setposition(-100,0)

count=0

def make_squares(i):

if i % 2 == 0:

begin_fill()

for i in range(4):

forward(25);

left(90)

end_fill()

penup()

pendown()

for i in range(6):

pendown()

make_squares(i)

penup()

forward(35)

Explanation:

3 0
2 years ago
Read 2 more answers
What feature did we use to quickly apply the formatting shown in this image?
hammer [34]

Answer:

Conditional formatting.

Explanation:

Conditional Formatting is the method that main objective to enabling the users for setting the formatting to the  cell or the cell range as well as it adjust the layout based that are based on the cell value or the formula value.

  • The Conditional formatting making the cell value as bold as in the given question we see that the cell value is bold  when the given condition is true.
  • The objective of pivot table is to summarizing the data it do not provide the formatting that's why this option is incorrect .
  • The objective of what if analysis is altering the absolute value of worksheet also it see how some modifications will influence the result of the worksheet formulae in the spreadsheet it do not provide the formatting that's why this option is incorrect .
  • Data scenario formatting do not provide the formatting that's why this option is incorrect .

3 0
3 years ago
You work part-time at a computer repair store, and you are on-site at a customer's premises. Your customer has signed up for DSL
patriot [66]

The fill up are:

First Install the DSL router and link it to the phone line via:

  • Look at the Shelf, and expand Routers.
  • Take in the DSL router to the Workspace area.
  • Beyond the router, click on Back to switch to the back view of the router.

<h3>What is the steps about?</h3>

Next check On the Shelf, and expand Cables.

Click on the twisted pair cable that has RJ11 connectors.

Looking at the Selected Component window, take in a connector to the RJ11 port on the router.

Looking at the Selected Component window, take in or drad the other connector to the empty phone port that can be seen on the wall outlet.

Then Plug in the router via:

The Shelf, click on the power adapter.

  • Using the Selected Component window, take in the DC power connector to the power port on the DSL router and also take in the AC power plug to the wall outlet then:

Click on the computer to the DSL router as follows:

Beyond the computer, click on Back to switch to the back view of the computer and in the Shelf, click on the Cat5e cable.

Using the Selected Component window, take in a connector to the network port on the computer and then take in other connector to a network port on the DSL router.

The implementing DSL and Select the DSL filter then click on the phone cable under Partial connections and take in or drag unconncected connector to the RJ11 port on the filter.

Learn more about DSL internet  from

brainly.com/question/14599737

#SPJ1

5 0
2 years ago
Write a new function called "listmax" based on the following IPO # function: listmax # INPUT: a list # PROCESSING: obtains the l
hammer [34]

Answer:

See Explaination

Explanation:

def listmax(lst):

largest = None

for num in lst:

if largest is None or num > largest:

largest = num

return largest

mylist = [10, 20, 30]

x = listmax(mylist)

print(x)

5 0
3 years ago
Other questions:
  • Instructions Write a program that allows the user to enter the last names of five candidates in a local election and the number
    8·1 answer
  • Your school computer library has a network that connects computers and devices within a few small rooms. what type of network do
    7·1 answer
  • Which of the following attack is a threat to confidentiality?
    10·1 answer
  • What to do when you strip a screw
    10·2 answers
  • One way to prepare for filing the PROFILE is to:
    12·2 answers
  • Which of the following statements best represents the impact vaudeville had on the film industry? Early silent films were more r
    14·1 answer
  • Someone talk to me please........
    5·2 answers
  • Python code 100 Random Numbers (twice)
    9·1 answer
  • Fungsi radio adalah..?
    11·1 answer
  • 1. Sunday Times wants an analysis of the demographic characteristics of its readers. The
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!