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
yaroslaw [1]
3 years ago
5

Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in a list and then dis

play the following data: • The lowest number in the list • The highest number in the list • The total of the numbers in the list • The average of the numbers in the list
Computers and Technology
1 answer:
Aleksandr-060686 [28]3 years ago
6 0

Answer:

The following are the program in the Python Programming Language.

#declare the list  

lst=[]

#set the for loop  

for num in range(1,21):

 #get the element of the list from the user

 n=int(input('Enter the {} element :' .format(num)))

 #add elements in the list

 lst.append(n)

print()

#print the minimum number in list

print('The lowest number in the list: ',min(lst))

#print the maximum number in list

print('The highest number in the list: ',max(lst))

#print the total of the list

print('The total of the numbers in the list: ',sum(lst))

#print the average of the list

print('The average of the numbers in the list: ',sum(lst)/len(lst))

<u>Output</u>:

Enter the 1 element :53

Enter the 2 element :65

Enter the 3 element :41

Enter the 4 element :23

Enter the 5 element :21

Enter the 6 element :12

Enter the 7 element :96

Enter the 8 element :85

Enter the 9 element :74

Enter the 10 element :98

Enter the 11 element :75

Enter the 12 element :41

Enter the 13 element :54

Enter the 14 element :56

Enter the 15 element :36

Enter the 16 element :25

Enter the 17 element :14

Enter the 18 element :12

Enter the 19 element :45

Enter the 20 element :65

The lowest number in the list:  12

The highest number in the list:  98

The total of the numbers in the list:  991

The average of the numbers in the list:  49.55

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, we declare the empty list type variable 'lst' to store elements.
  • Then, set the for loop statement that iterates from 1 and end at 20.
  • Then, set a variable that get elements of the list from the user and appends those user defined inputs in the list type variable 'lst'.
  • Finally, print the lowest and the largest elements in the list as well as print the total and average of the elements in the list.
You might be interested in
Which of the following is a true statement?
m_a_m_a [10]
Let me help you!
Did you know that both plants and animals undergo cellular respiration? The reason behind that is because both organims needs to get energy and to expel wastes.

Therefore, the correct answer for your question is: <span>C.Cellular respiration occurs in both plant and animal cells.

I hope that helped you! :></span>
4 0
3 years ago
What is spam? a type of virus that spreads from computer to computer through a network connection a type of virus that targets p
Bas_tet [7]

Answer:

This is a pretty obvious answer.

An unwanted e-mail sent in bulk from people or organizations.

Explanation:

8 0
3 years ago
Which is an aspect of structural level design?
natita [175]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

          "structural level design"

Structural engineer is a sub discipline of civil engineer are strained to design the bones and muscles that create the form and shape of man made structures.Structural engineer needs to understand and calculate the stability,strength and rigidity and earthquake of built structure of building and non building structures.The structural of other design are integrated with those of other designers such are architecture and building services engineer and often supervise the construction of projects by contractors on site.They can also be involved in the design of machinery,medical equipment,and vehicle where structural integrity affects functioning and safety.

Structural engineering theory is based upon applied physical law and empirical knowledge of the structural performance of differents materials and geometrics.Structural engineer engineer are responsible for making creative and efficient use of funds,structural elements and materials to achieve these goals.

7 0
3 years ago
My code get an input of 1900 and it should output not a leap year but it fails first line of code. It should output not a Leap a
marshall27 [118]

Answer:

Explanation:

The code does not fail on the first step since 1900 divided by 4 is actually 475 and has no remainder, meaning that it should return True. The code won't work because the if statements need to be nested in a different format. The correct algorithm would be the following, which can also be seen in the picture attached below that if we input 1900 it would output is not a leap year as it fails on the division by 400 which gives a remainder of 0.75

input_year = int(input())

if input_year % 4 == 0:

   if input_year % 100 == 0:

       if input_year % 400 == 0:

           print(input_year, "is a leap year")

       else:

           print(input_year, "- not a leap year")

   else:

       print(input_year, "is a leap year")

else:

   print(input_year, "- not a leap year")

3 0
3 years ago
Mohammad plans to visit a cave over the weekend with his friends. He wants to take photos inside of the cave. What piece of equi
Alborosie
A camera strap
Its the only one that makes sense
7 0
3 years ago
Read 2 more answers
Other questions:
  • These systems consist of interlinked knowledge resources, databases, human experts, and artificial knowledge agents that collect
    9·1 answer
  • Consider the following code: <br> x=9 y = -2 z=2<br> print (x + y * z)<br> What is output?
    10·1 answer
  • Helping people keep track on things is the purpose of_____ A database B table C query D form​
    12·1 answer
  • What is the problem with the code snippet below? public class Test { public static void main(String[] args) { System.out.println
    6·1 answer
  • When you're working with a word processing document and you press the del key, what happens?
    6·2 answers
  • How do I type over Images (photo posted ​
    12·2 answers
  • Any device that uses light to read and write information.
    9·2 answers
  • Ask the user to input a word. Then, print the first letter, the last letter, and the length of the word on the same line with no
    6·1 answer
  • How serious are the risks to your computer security?
    9·1 answer
  • When conducting memory and recall tests, some people make an effort to normalize memories by not reporting extreme cases. this l
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!