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
A computer is defined by 4 specific criteri. Select all 4.*
VikaD [51]

Answer:

Explanation:

Receive input, produce output, store information, process information

8 0
2 years ago
In this question, we give two implementations for the function: def intersection_list(lst1, lst2) This function is given two lis
castortr0y [4]

Answer:

see explaination

Explanation:

a)Worst Case-time complexity=O(n)

def intersection_list(lst1, lst2):

lst3 = [value for value in lst1 if value in lst2]

return lst3

lst1 = []

lst2 = []

n1 = int(input("Enter number of elements for list1 : "))

for i in range(0, n1):

ele = int(input())

lst1.append(ele) # adding the element

n2 = int(input("Enter number of elements for list2 : "))

for i in range(0, n2):

ele = int(input())

lst2.append(ele) # adding the element

print(intersection_list(lst1, lst2))

b)Average case-time complexity=O(min(len(lst1), len(lst2))

def intersection_list(lst1, lst2):

return list(set(lst1) & set(lst2))

lst1 = []

lst2 = []

n1 = int(input("Enter number of elements for list1 : "))

for i in range(0, n1):

ele = int(input())

lst1.append(ele)

n2 = int(input("Enter number of elements for list2 : "))

for i in range(0, n2):

ele = int(input())

lst2.append(ele)

print(intersection_list(lst1, lst2))

6 0
3 years ago
Who is the primary audience for demonstrations of game prototypes made by the developer?
padilas [110]

Answer:

the tester

Explanation:

When a video game is playable the first audience to test these prototypes are the tester, these people have to test all the game, and they have say all the information about errors, issues, bugs, and any difficulty to resolve these problems in a final video game's version, in this way the complete game arrives to the final audience.

5 0
2 years ago
Which type of programmer designs programs for applications executed on the internet?
lisabon 2012 [21]
Wait. What? What does that even mean?
8 0
3 years ago
Website administrators relay on ______, which is data such as the number of users who commented on, shared, viewed, or liked web
marin [14]

Answer:

b. analytics

Explanation:

-Hits are the amount of times that a website or program has been accessed.

-Analytics refers to the analysis of data to be able to make favorable decisions.

Cookies are files that are saved in a computer that are used to track the activity of a user in a website.

-Benchmaking is a technique in which a company compares its performance with businesses in the same industry.

According to this, the answer is that website administrators relay on analytics, which is data such as the number of users who commented on, shared, viewed, or liked webpage content.

3 0
2 years ago
Read 2 more answers
Other questions:
  • True or false? It is just too challenging to have different password for every
    12·1 answer
  • The ____ file permission category in unix/linux systems typically entails all permissions and is designated by the letter u.
    7·1 answer
  • In your opinion, is it more beneficial to have many folders or is it better to “nest” subfolders? Explain your response.
    10·2 answers
  • Write a program to add two number marie simulator.
    15·1 answer
  • Drag each storage device to its category.
    7·1 answer
  • What technique creates different hashes for the same password? ccna routing protocols final answers?
    7·1 answer
  • The CPU package is installed using the ____ process
    7·1 answer
  • A ________ is a member function that is automatically called when a class object is
    6·1 answer
  • Did anyone do 5.7.5 Factorial on Code HS??<br><br><br><br> 20 POINTS
    9·1 answer
  • An article explaining the uses of the parts of a computer​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!