subject

Write a python program to do the following:

(a) ask the user to enter as many integers from 1 to 10 as he/she wants. store the integers entered by the user in a list. every time after the user has entered an integer, use a yes/no type question to ask whether he/she wants to enter another one.

(b) display the list.

(c) calculate and display the average of the integers in the list.

(d) if the average is higher than 7, subtract 1 from every number in the list. display the modified list.

the following is an example:

enter an integer from 1 to 10: 5

enter another integer? [y/n] y

enter an integer from 1 to 10: 8

enter another integer? [y/n] y

enter an integer from 1 to 10: 9

enter another integer? [y/n] y

enter an integer from 1 to 10: 7

enter another integer? [y/n] y

enter an integer from 1 to 10: 8

enter another integer? [y/n] n

number list: [5, 8, 9, 7, 8]

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Meenu wants to create a high quality drawing in a variety of colours. which device should she use for the same?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
What process should be followed while giving a reference? sam has given a reference of his previous manager in his resume. sam should him in advance that the potential employers will him.
Answers: 1
You know the right answer?
Write a python program to do the following:

(a) ask the user to enter as many integers...
Questions