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
Does someone know what type of usb is that one called?
Doss [256]
It is USB 2.0 mini b 5 pin

3 0
3 years ago
Read 2 more answers
People express more. often through the ___. language than written language
Oxana [17]
Verbal language because somebody's verbal words are more receptive then ones written word
5 0
3 years ago
Read 2 more answers
What will be the output?
Nataly_w [17]
<h3>Answer : 32</h3>

<h3>Explanation</h3>

the variable a & b and A & B are different. So the only program that work is at #main program.

Hence that A = 8 and B = 4 and the result is A * B so 8*4=32.

Sorry if im wrong

6 0
3 years ago
try the following code to see a nullpointer error (if you don’t see the error because of the autograding, you can copy it into t
gavmur [86]

Using the knowledge of computational language in JAVA it is possible to describe  since s is null, indexof throws an nullpointer error for s. comment out the first if statement and run the program again. the second if statement avoids the error with shortcircuit evaluation.

<h3>Writting the code:</h3>

<em>public class Printer {</em>

<em>    private String name;</em>

<em>    public void print() {</em>

<em>        </em><em>printString</em><em>(name);</em>

<em>    }</em>

<em>public class Example {</em>

<em />

<em>    public static void </em><em>main</em><em>(String[] args) {</em>

<em>        Object obj = null;</em>

<em>        obj.hashCode();</em>

<em>    }</em>

<em />

<em>}</em>

<em>    public static void </em><em>main</em><em>(String[] args) {</em>

<em>        Printer printer = new Printer();</em>

<em>        printer.print();</em>

<em>    }</em>

<em>}</em>

<em>    }</em>

<em>public class Example {</em>

<em />

<em>    public static </em><em>void </em><em>main(String[] args) {</em>

<em>        Object obj = null;</em>

<em>        obj.hashCode();</em>

<em>    }</em>

<em />

<em>}</em>

<em>    public static void </em><em>main</em><em>(String[] args) {</em>

<em>        Printer printer = new Printer("123");</em>

<em>        printer.print();</em>

<em>    }</em>

<em>}</em>

See more about python at brainly.com/question/19705654

#SPJ1

4 0
1 year ago
When the Credit Card Number box and the CSC box receive the focus, a transition effect should appear that slowly adds a glowing
svp [43]

Answer:

dire ako maaram hito because dire ako baltok

medyo <em><u>la</u></em>

5 0
3 years ago
Other questions:
  • Artemisia gentileschi used directional line brilliantly in her painting judith decapitating holofernes to draw our attention to
    12·1 answer
  • When is the bond between the actin and myosin head is broken? when an ATP molecule binds to the myosin head when an ATP molecule
    6·1 answer
  • Cleo received a message from Joline that was sent to her as well as two other coworkers named Sam and Thomas. Cleo
    6·2 answers
  • Within the information category of functions, you will find functions that ____.
    7·2 answers
  • Recall that two strings u and v are ANAGRAMS if the letters of one can be rearranged to form the other, or, equivalently, if the
    7·1 answer
  • Need help with this
    12·1 answer
  • What how do i delete a question
    8·1 answer
  • How to do a row of circles on python , with the commands , picture is with it .
    11·1 answer
  • Decribe the advantages of using emails compared with physical faxing ?
    8·1 answer
  • How to ignore punctuation before and after a word javascript
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!