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
For angular how can we set up th edatabse.
lesya [120]
You can not communicate directly between Angular and MySQL. You'll need to build a back-end Web service that calls MySql using php or node. Angular can communicate with this back-end Web service via http.
8 0
2 years ago
Question
Serhud [2]
Could be second or all of above
8 0
2 years ago
True or False
anastassius [24]

I used this from a other.

False

Software is the collection of large program or instruction of codes, which is used to perform some task. It is of two types of system software and application software.

The system software is used as a container for the application software and it is used to handle all other software it is used to operate the system.

Application software is used to perform any operation. This type of software can be used by the user if it is installed on the local machine on any system software

The operating system is also the part of the system software because it is used to operate the system and it is also the soul of the computer system which is also the function of the system software but the above question states that the operating system is not the part of the system software which is not correct. Hence false is the correct answer to the above question.

5 0
3 years ago
Leo lives in a two-story home in an upscale neighborhood, drives a brand-new sports car, and makes more than $250,000 per year.
prisoha [69]
(D) Standard of living. Because, from this text you can tell that Leo is a wealthy person, and welthy people tend to get the best things, including fancy neighborhoods and Cars. So its most likely (D)
5 0
3 years ago
Read 2 more answers
Write a date transformer program using an if/elif/else statement to transform a numeric date in month/day format to an expanded
boyakko [2]

I wrote it in Python because it was quick so i hope this is helpful

Answer:

date = input('Enter Date: ')

split_date = date.split('/')

month = split_date[0]

day = split_date[1]

if month == '1':

   english_month = 'January'

   spanish_month = 'Enero'

elif month == '2':

   english_month = 'February'

   spanish_month = 'Febrero'

elif month == '3':

   english_month = 'March'

   spanish_month = 'Marzo'

elif month == '4':

   english_month = 'April'

   spanish_month = 'Abril'

elif month == '5':

   english_month = 'May'

   spanish_month = 'Mayo'

elif month == '6':

   english_month = 'June'

   spanish_month = 'Junio'

elif month == '7':

   english_month = 'July'

   spanish_month = 'Julio'

elif month == '8':

   english_month = 'August'

   spanish_month = 'Agosto'

elif month == '9':

   english_month = 'September'

   spanish_month = 'Septiembre'

elif month == '10':

   english_month = 'October'

   spanish_month = 'Octubre'

elif month == '11':

   english_month = 'November'

   spanish_month = 'Noviembre'

elif month == '12':

   english_month = 'December'

   spanish_month = 'Diciembre'

US_English = f'{english_month} {day}'

International_Spanish = f'{day} {spanish_month}'

print(f'US English Form: {US_English}')

print(f'International Spanish Form: {International_Spanish}')

Input:

3/5

Output:

US English Form: March 5

International Spanish Form: 5 Marzo

Explanation:

You start by taking input from the user then splitting that at the '/' so that we have the date and the month in separate variables. Then we have an if statement checking to see what month is given and when the month is detected it sets a Spanish variable and an English variable then prints it to the screen.

Hope this helps.

7 0
2 years ago
Other questions:
  • What are the uses of joystick​
    13·1 answer
  • Why would a brokered CD pay more than a regular CD?
    13·1 answer
  • Rint "Censored" if userInput contains the word "darn", else print userInput. End with newline.
    11·1 answer
  • Next, go to the mw_tour.html file. Within the document head, create links to the mw_layout.css and mw_styles.css style sheet fil
    10·1 answer
  • ____ is the process of drawing a series of increasingly detailed DFDs, until all functional primitives are identified.
    7·1 answer
  • Given a matrix input_matrix, return a Numpy array that consists of every entry of A that has: an even row index in the range [0,
    9·1 answer
  • If all the data in a database is not physically located in one place, it would be a(n _______ database.
    5·1 answer
  • Please as soon as possible
    13·1 answer
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
  • If i keep giving out brainlyest will i get banned again?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!