Write a program that reads numbers from the user until a blank line is entered. Your
program should display the average of all of the values entered by the user. Then
the program should display all of the below average values, followed by all of the
average values (if any), followed by all of the above average values. An appropriate
label should be displayed before each list of values.

Answers

Answer 1

Answer:

nums = []

while True:

   in = input()

   if in:

       nums.append(in)

   else:

       break

if nums:

   avg = sum(nums) / len(nums)

   for i in range(len(nums)):

       if nums[i] == avg:

           print(f"index: {i+1}")

           print(nums[i])

else:

   print(-1)  # if there aren't any values in nums

Explanation:

Assuming that you are coding in Python 3x. The last 'else' statement is an edge case that you might want to consider, I don't know what you want to put there, but I'm just going to leave it as -1.


Related Questions

what is a "for loop" that will produce the following output:

1+2 = 3
2+3 = 5
4+5 = 9
8+9 = 17
16+17 = 33
32+33 = 65
64+65 = 129

any help would be very appreciated

Answers

Answer:

128+129= 257

Explanation:

128+129= 257

Answer:

1+2= 3

loop for all interger

What the three factors that AI is using for information gathering



Answer and I will give you brainiliest ​

Answers

Answer:

AI uses accelerometers, infrared, magnetic and other electronic sensors to gather data

What are the difference generation of computer system?

Answers

Answer:

5 generations

Explanation:

1st generation 1940's to 1950's vacuum tube based.

2nd generation 1950's to 1960's transistor based.

3rd generation 1960's to 1970's integrated circuit based.

4th generation 1970's to 1980's microprocessor based.

5th generation present and future artificial intelligence based.

SOME PLEASE DO THIS ASAPP!!

Answers

Answer: I think it’s really cool. You don’t have to find someone g m ai l and then write a subject and whatever else. You can just send it like a m ess age. I love how it has the call option because it means that you don’t have to have a nu m ber to call your friends or family. And you can do business em ai l while me s saging whoever you need to instead of going back and forth.  

You can promote your business. You can also promote your video and share your screen. It is also a good way to talk to customers to discuss what you need to. A bunch of people have g m ails and it’s fairly simple to just add your friend and te xt them.  

It might be hard to figure out at first. But when you get used to it its fairly simple. It can also shut down do to a bug and stop working, which makes it even more complicated. You can also get creeps that can hack into your gm a i l and read all of your information. (there is a few words i spaced out bc it wouldnt let me send)

Explanation:

which is NOT a basic human sense used in collecting collecting data?

Answers

Answer:

Explanation:This section outlines some of the key considerations that may arise during various steps in the data collection process. There is no requirement that these steps be followed or pursued in the order that they are written. The model presented is offered as a reference tool. How data is gathered and analyzed depends on many factors, including the context, the issue that needs to be monitored, the purpose of the data collection, and the nature and size of the organization.

3. Find the best.

Write a program that will allow an instructor to enter a series of exam scores. After the last score, the instructor should enter a negative number as a signal that there is no more input. Print the average of all the scores and the highest score entered.

Do this with beginner c programming.

Example output:

Exam Average Program
Enter the scores when prompted, negative number to quit.
> 1
> 10
> 5
> -1

Average Score = 5.3333, best = 10

Answers

Answer:

1. is the answer

Explanation:

mark me as brainlest

Can Microsoft Office training and skills make you more productive, confident, and marketable?

Answers

Answer:

Microsoft Office training can give you the confidence to use the tools you are provided. Having your MS Office skills professionally trained with significantly increases your work efficiency and confidence, which will also bring you with a sense of job satisfaction at work.

Someone help me please i need to finish this

Answers

Answer:

My digital life is like a adventure because there is so much to discover.

Hope this help please give the brainliest award.

Write a predicate function called same_ends that accepts a list of integers and an integer (n) as arguments. Return True if the first n numbers in the list are the same as the last n numbers in the list, and False otherwise. For example, if the list was [1, 2, 3, 4, 99, 1, 2, 3, 4], the function would return True if n is 4 and False if n is 3. Assume that n is between 1 and the length of the list, inclusive. Solve It!

Answers

Answer:

5=5

Explanation:

2+2 is 4

Below is the required Python code for the program.

Python

Program code:

# Starting the code

# Defining a function

def same_ends(lst, n):

   # Starting a loop

   if lst[:n] == lst[-n:]:

       return True

   else:

       return False

# Testing the function

lst = [1, 2, 3, 4, 99, 1, 2, 3, 4]

# Printing the values

print(same_ends(lst,4))

print(same_ends(lst,3))

Explanation:

Starting the code.Defining a function.Starting a loop.Testing the function.Printing the values.End up a code.

Output:

Find below the attachment of the code output.

Find out more information about python here:

https://brainly.com/question/26497128

Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value for hours worked in a day. The program calculates the hours worked in a five-day week and the hours worked in a 252-day work year. The program outputs all the results.

Answers

Answer:

i think its 2131

Explanation:

c

As of 2007, how many concentrated solar power plants did the United States have?

Answers

Answer:

12,718

Explanation:

Hope this helps! Let me know! :)

OSI layer for HDLC??​

Answers

Answer:

HDLC is one of the most commonly used internet protocols (IP) in what is Layer 2 of the industry communication reference model called Open Systems Interconnection (OSI).

Explanation:

did y’all enjoyed project next phase 3 and The 4 revamped heroes

Answers

Answer:

it was good i liked it

Explanation very good

Project: Current Event: Cyber Bullying
Using the Internet, your local paper, or other resources, find a recent article on cyber bullying
(published in the last two years). Write an article review that includes:
1. a description of the article (was it a case of cyber bullying or ways to prevent cyber bulling?);
2. list five key points and describe how they apply to you and your use of social media;
3. make a suggestion of two important things that you think the article should have, but did not
cover; and
4. include the URL to the article or a copy of the article.

Answers

Sending, posting, or disseminating unfavorable, hurtful, or malicious content about someone else is considered cyberbullying. It can also involve disclosing sensitive or private information about another individual in a way that causes embarrassment or humiliation.

What are the research paper's impacts on cyberbullying?

The current study contributes to the expanding corpus of research on the effects of being a victim of cyberbullying on depressive symptoms and bad thoughts in adolescents and young adults. According to our research, those who experience cyberbullying are more likely to have sadness and bad thoughts. Cyberbullying occasionally veers into illegal or criminal action.

Teenagers who experience cyberbullying report more severe bodily symptoms, anxiety, loneliness, and depression symptoms. Cyberbullying perpetrators are more likely to admit to abusing drugs, acting aggressively, and engaging in delinquent behavior.

To know more about the Cyber Bullying visit;

https://brainly.com/question/1460915

#SPJ1

What is the use of Word Processing and Spreadsheet in an organization?

Answers

Summary: Difference Between Word Processing and Spreadsheet is that Word processing software, allows users to create and manipulate documents containing mostly text and sometimes graphics. While Spreadsheet software allows users to organize data in rows and columns and perform calculations on the data.

Choose the comparison operator that will create a true statement in scratch

Answers

Answer:

the first one

Explanation:

think about it. 60 equals 60! this is true!

Answer:

A is correct

Explanation:

i took this same test

What is the difference between cipher block chaining mode and electronic code book mode?

Answers

ECB (Electronic Codebook) is essentially the first generation of the AES. It is the most basic form of block cipher encryption. CBC (Cipher Blocker Chaining) is an advanced form of block cipher encryption. With CBC mode encryption, each ciphertext block is dependent on all plaintext blocks processed up to that point.

Answer:

ECB (Electronic Codebook) is essentially the first generation of the AES. It is the most basic form of block cipher encryption.

CBC (Cipher Blocker Chaining) is an advanced form of block cipher encryption. With CBC mode encryption, each ciphertext block is dependent on all plaintext blocks processed up to that point.

if the middle number is lesser than the candidates then u eliminate the ___ half of the data​

Answers

Answer:

kimochisiwiwie282828

identifica clases de técnicas que se emplean para el desarrollo y emplean empleo de las cosas que nos rodean hechos para satisfacer la necesidad del ser humano.


AYUDA ES PARA HOYY

Y PORFAVOR EXPLÍQUENME EN ESPAÑOL

Answers

Answer:

HEY I SAID PHYSICS NOT COMPUTER STUFF

Explanation:

I CAN'T EVEN READ IT

Using a vue-cli initiated project, make a ticker that will keep track of the number of attendees in a space

Answers

Number of attendees

arithmetic test is given twice within a few days to a student. The highest possible score is 40. He receives a score of 35 the first time and a score of 18 the second time. If similarly varying results are obtained from other students, the test result is probably unreliable in the idea o

Answers

Similar varying results obtained as scores from other students indicates that the test is; Unreliable.

This is about test reliability and it is based on consistent results. This implies that it is a measure of how well a characteristic of a test is measured dependably or consistently.

With reference to the above on test reliability, applying it to our question. If the student took the test twice and got a similar result the two times, then the test is said to measure the score reliably but if the two scores are not similar but vary widely from each other, then the test is said not to measure the score consistently and is said to be unreliable.

In our question, since varying results scores are continually obtained for two same tests of same students, then we can say the test does not measure the scores reliably and we can conclude that the test is unreliable.

Read more at; https://brainly.com/question/15136257

Technician A says that long hair should be secured to avoid entanglement. Technician B says that hairnets are NOT an effective means to secure hair. Who is correct? Select one: a. Technician A b. Technician B c. Both A and B Or d. Neither A nor B​

Answers

Answer:

technician A if you use the net it still saves the hair than letting it long and exposed

What do Virtually all of the 7 million millionaires in the United States do??
Virtually all of the 7 million millionaires in the United States:

never had to think about tomorrow, since they knew they would be rich.

were always thinking ahead.

wanted their money to work for them.

wanted to store their money under the bed.

were looking forward to buying a lot of nice toys.

assumed all sellers were telling the truth.

learned how to make smart decisions by doing their homework.

always paid their cell phone first.

always paid themselves first.

Answers

It is assumed by a lot of people that the life of the people who are very rich is very easy and that they do not have to work so hard. People think that the rich people have always had a bed of roses kind a life for them. But that is not the reality. Rich people also have to work hard to get success in their life and for that they have to think properly and wisely before making decisions in their life. These people have to make a lot of research and do a lot of home work before making decisions and have to think a lot. It is not very easy for them also.

Option 7 is the most apt

but if there can be multiple options, then it would be 2,3,7 and 9

Many people believe that the lives of the wealthy are easy and also that they do not have to work as hard as the rest of us.

7 million millionaires in the United States:

People believe that the lives of the wealthy has always been a bed of roses.

However, this is not the case. Rich individuals must also work hard in order to achieve success in life, and they must think carefully and sensibly before making decisions.

Before making judgments, these folks must conduct extensive study and complete extensive homework, as well as reflect deeply. It's not easy for them either.

So, option '7' is the correct answer to the following question.

Find out more information about 'Judgments'.

https://brainly.com/question/26380040?referrer=searchResults

How is advertising using social media different from using traditional advertising?

Answers

Answer: Social media marketing allows for more succesful and personalized messaging, but traditional marketing tactics are usually more static with a harder reach of audience.

Question 3 of 15
Which term describes a computer program's ability to run, receive feedback to
rewrite, and improve its own algorithms for the future?
A. Machine learning
B. Operator with variables
C. Algorithmic bias
D. If-then programming

Answers

A. Machine learning

Machine learning is the study of computer algorithms that can be automatically modified for improvement through experience and the use of data.

How can i watch the Loud house FREE with a fire stick ? will mark brainliest :3

Answers

Answer:

cinema you'll have to download it

When people become more dependent on digital technology in their lives, the potential for data misuse will grow.

Explain the above sentence in your opinion.




Answer and I will give you brainiliest ​

Answers

Answer:

abbjiaj

zzz

Explanation:

uuwuwahsbsbsssiaaivab njw

highlight and detail two ways that you can use excel to make you more efficient as a college student

Answers

You can use excel to help you become more successful because you can use it to write all your grades for each class and see what you need to improve on. You can also keep track of everything on a spreadsheet. Another way excel helps you and is beneficial in college is you can use it to put the information of all the classes you have taken to see if you have enough credits or what credits you will need to pass. Excel is very beneficial in many ways.

MS excel is a office program and is quite commonly used in day to day business. The application is easy to use and have various advantages, as it can be used for statistical and scientific purposes.

The application can be made easy and presented in numerous ways. In order to highlight the importance of this software as a college student one can show the methods to interpret the data.  Making worksheets and visualizing large amounts of data. Use of shortcuts for formula and use graphics to enhance presentations.

Learn more about the detail two ways that you can use excel to make you.

brainly.com/question/24325415.

Hiding text in a picture is known as?

Answers

Answer:streganography

Explanation: it allows you to hide text in an image without anyone knowing

What is one still image in a film or video called?
unit
frame
stand
selection

Answers

Answer:

frame

Explanation:

the answer is frame ;)

Answer:

Frame

A still frame is a single static image taken from a film or video, which are kinetic (moving) images. Still frames are also called freeze frame, video prompt, preview or misleadingly thumbnail, keyframe, poster frame, or screen shot/grab/capture/dump

Explanation:

Pls mark as brainliest

Other Questions
Lydia is having a barbecue. Two containers of juice serve 10 people. How many containers of juice should she get to serve 40 people at the barbecue? which fraction is equivalent to 9_10 7. Conser the following graph of an absolute value functionPort A: Define the domainPort : Define the range.Part C. Where is the graph increasing(-4,1, -2,3)Part D: Where is the graph decreasingPart E: EIdentify any relative maximums.Part F: Identify any relative minimums. did matthew gray gubler sing in alvin and the chipmunks Should we be able to elect Federal judges and Supreme Court Justices? Explain your thoughts. How are Fahrenheit temperatures converted to Celsius temperatures?subtract 273 from the original numbermultiply the number by 95 and then add 32subtract 32 and then multiply that number by 59add 273 to the original number the time interval required for the formation of two cells from one is called the How does the allusion to William Shakespeare affect the meaning of the text?It shows that Angelou identifies with the feelings expressed in Shakespeare's poem.It reveals how much Angelou admires those who are not like herself.It foreshadows Angelou's future career as a writer.It suggests Angelou's desire to leave her surroundings and go elsewhere. What evidence exists that non-verbal behaviour is innate? (3 marks) Plz help I need help somebody please help I hate geometry 1 Do you think we need to produce more food or change our consumption habits? Why? 2 Are you willing to pay more for locally grown food? Why or why not? in this life cycle, what do the light- and dark-colored arrows represent? What important role is being described?Completes the Action Item form. if Devaughn is 13 years older than Sydney. and The sum of their ages is 67 what is sydney's age A total of 176 valves were used for 8 cars asthey were being assembled. The same numberof valves were used for each car. How manyvalves were used for each car? how Qin Shihuangdi worked to unify China economically. Please help me asap with explanation please Differentiate between the terms rotation and revolution as related to Earth Movement. Helpppppppppppppppppp