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 03:30
Some of your friends have gotten into the burgeoning field of time-series data mining, in which one looks for patterns in sequences of events that occur over time. purchases at stock exchanges--what’s being bought-- are one source of data with a natural ordering in time. given a long sequence s of such events, your friends want an efficient way to detect certain "patterns" in them--for example, they may want to know if the four events buy yahoo, buy ebay, buy yahoo, buy oracle occur in this sequence s, in order but not necessarily consecutively. they begin with a collection of possible events (e.g., the possible’ transactions) and a sequence s of n of these events. a given event may occur multiple times in s (e.g., yahoo stock may be bought many times in a single sequence s). we will say that a sequence s’ is a subsequence of s if there is a way to delete certain of the events from s so that the remaining events, in order, are equal to the sequence s’. so, for example, the sequence of four events above is a subsequence of the sequence buy amazon, buy yahoo, buy ebay, buy yahoo, buy yahoo, buy oracle their goal is to be able to dream up short sequences and quickly detect whether they are subsequences of s. so this is the problem they pose to you: give an algorithm that takes two sequences of even~s--s’ of length m and s of length n, each possibly containing an event more than once--and decides in time o(m n) whether s’ is a subsequence of s
Answers: 2
question
Computers and Technology, 22.06.2019 14:40
You are working with a professional edition organization. they wish to install the expense tracker which requires the use of 4 custom tabs, 3 custom objects, and one custom app. if the company is already using 4 applications, 36 custom objects, and 7 custom tabs, what will happen when they try to install expense tracker?
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
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
You know the right answer?
Write a python program to do the following:

(a) ask the user to enter as many integers...
Questions
Questions on the website: 13722361