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 08:00
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 22.06.2019 22:40
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
question
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
You know the right answer?
Write a python program to do the following:

(a) ask the user to enter as many integers...
Questions
question
Mathematics, 08.02.2021 23:20
question
Mathematics, 08.02.2021 23:20
question
Biology, 08.02.2021 23:20
Questions on the website: 13722361