Write a Python program that allows the user to enter any number of non-negative floating-point values. The user terminates the input list with any negative value. The program then prints the sum, average (arithmetic mean), maximum, and minimum of the values entered. Algorithm: Get all positive numbers from the user Terminate the list of numbers when user enters a negative

Answers

Answer 1

Answer:

The program in Python is as follows:

nums = []

isum = 0

num = int(input("Num: "))

while num >= 0:

   isum+=num

   nums.append(num)

   num = int(input("Num: "))

   

print("Sum: ",isum)

print("Average: ",isum/len(nums))

print("Minimum: ",min(nums))

print("Maximum: ",max(nums))

Explanation:

My solution uses list to answer the question

This initializes an empty list, num

nums = []

This initializes the sum of the input to 0

isum = 0

This prompts the user for input

num = int(input("Num: "))

The loop is repeated until the user enters a negative number

while num >= 0:

This calculates the sum of the list

   isum+=num

This appends the input to the list

   nums.append(num)

This prompts the user for another input

   num = int(input("Num: "))

   

This prints the sum of the list

print("Sum: ",isum)

This prints the average of the list

print("Average: ",isum/len(nums))

This prints the minimum of the list

print("Minimum: ",min(nums))

This prints the maximum of the list

print("Maximum: ",max(nums))


Related Questions

Which of the following is probably not a place where it is legal to download the music of a popular artist whose CDs are sold in stores?

Answers

Answer:

A. Personal blogs

Explanation:

I did the quick check, and there you go...it's A.

Four reasons why users attach speakers to their computer

Answers

Sound
Quality
Easier
Reliable

Describe how operating system use the following security tools: firewall, automatic updating, antivirus software, spyware and malware detection software

Answers

Answer:There are several software products and settings you can make that will help alert you to or protect you from certain kinds of technology attacks such as malware, viruses, and so on.   Use these programs and keep them up to date so they can defend you against the latest threats.

Explanation:


State
any three (3) reasons why users attach speakers to their computer?

Answers

Answer:

To complete the computer setup, to hear audio, to share audio.

Explanation:

A computer is not really complete without speakers.

So that you can actually hear the computer's audio.

So that you can have multiple people hear the same audio. (Headphones do not do this)

The city of Green Acres is holding an election for mayor. City officials have decided to automate the process of tabulating election returns and have hired your company to develop a piece of software to monitor this process. The city is divided into five precincts. On election day, voters go to their assigned precinct and cast their ballots. All votes cast in a precinct are stored in a data file that is transmitted to a central location for tabulation.

Required:
Develop a program to count the incoming votes at election central.

Answers

Answer:

Explanation:

The following program asks the user to enter the precinct number and then loops to add votes until no more votes need to be added. Then it breaks the loop and creates a file called results to save all of the results for that precinct.

precinct = input("Enter Precinct Number: ")

option1 = 0

option2 = 0

while True:

   choice = input("Enter your vote 1 or 2: ")

   if int(choice) == 1:

       option1 += 1

   else:

       option2 += 1

   endVote = input("Vote again y/n")

   if endVote.lower() != 'y':

       break

f = open("results.txt", "w")

f.write("Precinct " + precinct + ": \nOption 1: " + str(option1) + "\nOption 2: " + str(option2))

What menu and grouping commands is the "SORT" tool? ( please answering meeeee)

A)Home - editing

B) Edit - format

C )Page layout - sheet options

D) File - edit

Answers

C, sorting is meant to arrange therefore layout falls under that

why do we need to settle technology in business?​

Answers

Answer:

Technology has important effects on business operations. No matter the size of your enterprise, technology has both tangible and intangible benefits that will help you make money and produce the results your customers demand. Technological infrastructure affects the culture, efficiency and relationships of a business.

PLS HELP SO I CAN PASS WILL GIVE BRAINLINESS AND 30 POINTS
Charlie Chaplin is know for developing

a
The Dramedy
b
Early Special Effects
c
Slap-Stick
d
The Prat-Fall
Question 2 (1 point)
Chaplin felt it was important for the audience to

a
turn off their cellphones during the movie.
b
believe the stunts were real by doing them himself.
c
escape from their problems by avoiding difficult topics.
d
have an emotional connection with the characters.
Question 3 (3 points)
Match the silent film with its modern influence

Column A
1.
Metropolis:
Metropolis
2.
The Kid:
The Kid
3.
Nosferatu:
Nosferatu
Column B
a.Freddy Kruger
b.The Simpsons
c.Sharknado
d.Star Wars
Question 4 (1 point)
How did Nosferatu change the Vampire cannon (story)?

a
Vampires are friendly
b
Vampires can be killed by sunlight
c
Vampires can become invisible
d
Vampires can be repelled by garlic
Question 5 (1 point)
Metropolis was the first film to

a
have religious undertones.
b
use special effects.
c
have humanoid robots.
d
use Gothic Imagery.


movies being the kid , nosferatu , and metropolis

Answers

Answer:

a

have religious undertones.

b

use special effects.

c

have humanoid robots.

d

use Gothic Imagery.

Explanation:

8. It is used to get qualitative data.​

Answers

Answer:

please give me brainlist and follow

Explanation:

Qualitative data describes qualities or characteristics. It is collected using questionnaires, interviews, or observation, and frequently appears in narrative form. For example, it could be notes taken during a focus group on the quality of the food at Cafe Mac, or responses from an open-ended questionnaire.

What is the effect when one part of a system changes? A. The entire system changes or could stop working. B. The closed-loop system becomes an open-loop system. C. The open-loop system becomes a closed-loop system. D. The larger system is not affected.

Answers

Answer:

c is the answer hope you get it right

The effect when one part of a system changes C. The open-loop system becomes a closed-loop system.

Systemic change is generally understood to require adjustments or transformations in the policies, practices, power dynamics, social norms or mindsets that underlie the societal issue at stake. It often involves the collaboration of a diverse set of players and can take place on a local, national or global level.

How does a systemic change happen?

All systems organize individual pieces into some sort of interrelated whole. Put simply, systemic change occurs when change reaches all or most parts of a system, thus affecting the general behavior of the entire system.

Why is systems change important?

A systems-change approach is more appropriate for problems that are complex, unpredictable, and context-dependent. For example, the challenge of inadequate access to educational opportunities for children from low-income neighborhoods cannot be addressed with a straightforward, logistical fix.

To learn more about A systems-change, refer

https://brainly.com/question/20798008

#SPJ2

unanswered questionl

Answers

¿ ? ¿ ? Whattttt ? ¿ ? ¿

Answer: What

Explanation:

what is descriptive research​

Answers

Answer:

Descriptive research is used to describe characteristics of a population or phenomenon being studied. It does not answer questions about how/when/why the characteristics occurred. Rather it addresses the "what" question

The order of slides can be changed here.

Answers

ANSWER:

Yes

WHY:

Not enough information is explained


MARK ME BRAINLIEST PLEASE

Write a program that will filter a list of non-negative integers such that all duplicate values are removed. Integer values will come from standard input (the keyboard) and will range in value from 0 up to 2,000,000,000. Input will be terminated by the special value, -1. Once the input is read in you should output (to the screen) the list of numbers as a sorted list (smallest to largest) with one value listed per line where all duplicates have been removed. The primary difficulty with this program is that there are an enormous number of input values and an expected large number of duplicate numbers.

Answers

Answer:

The program in python is as follows:

original = []

inp = int(input(": "))

while inp>=0:

   if inp<=2000000000:

       original.append(inp)

   inp = int(input(": "))

newlist = []

for i in original:

if i not in newlist:

 newlist.append(i)

newlist.sort()

for i in newlist:

   print(i)

Explanation:

This initializes the original list

original = []

This gets input for the list

inp = int(input(": "))

The following loop is repeated while input is not negative

while inp>=0:

This ensures that only inputs from 0 and 2000000000 enters the list

   if inp<=2000000000:

       original.append(inp)

Prompt the user for another input

   inp = int(input(": "))

This initializes a newlist

newlist = []

Iterates through the original list

for i in original:

Check for duplicate

if i not in newlist:

Each number is entered to the new list, without duplicate

 newlist.append(i)

This sorts the new list in ascending order

newlist.sort()

This prints the list item one per line

for i in newlist:

   print(i)

To understand, read, and give meaning to data in
tables and charts is to perform which of the
following?

A interpretation

B analysis

C assessment

D data collection

Answers

Answer:

teh answer is b

Explanation:

which of the

following?

A interpretation

B analysis

C assessment

D data collection

Answer:

interpretation

Explanation:

1

discuss five domains of Instructional technology​

Answers

Answer:

Design, Development, Utilization, Management, and Evaluation.

The phone in your hand is a computer. So too is the machine that occupies a 100,000 square foot data center. Given their vast differences in size, how can they both be computers?

Answers

Answer:

Well when you think about it they both do the same thing but they are diffirent, they have the same perpose but diffirent parts in them so, when you compair them the phone is smaller and slower, the bigger the computer the better it is depending on the amount of money spent on parts.

Which of the following is a form of media?Check all that apply.

A. a brochure distributed to many people

B. a diary

C. an email to a friend

D. a blog

Answers

Answer:

A. a brochure distributed to many people.

D. a blog.

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties.

Generally, the linear model of communication comprises of four (4) main components and these are;

1. Sender (S): this is typically the source of information (message) or the originator of a message that is being sent to a receiver. Thus, they are simply the producer of a message.

2. Channel (C): this is the medium used by the sender for the dissemination or transmission of the message to the recipient. For example, telephone, television, radio, newspapers, billboards etc.

3. Message (M): this is the information or data that is being sent to a recipient by a sender. It could be in the form of a video, audio, text message etc.

4. Receiver (R): this is typically the destination of information (message) or the recipient of a message that is being sent from a sender.

Hence, the following are forms of media (communication channel);

I. A brochure distributed to many people. It comprises of printed textual informations used mainly for promotional purposes.

II. A blog. It is an online website that contains both textual and multimedia messages, especially as a news platform.

What methods do phishing and spoofing scammers use?

Answers

Answer:

please give me brainlist and follow

Explanation:

There are various phishing techniques used by attackers:

Installing a Trojan via a malicious email attachment or ad which will allow the intruder to exploit loopholes and obtain sensitive information. Spoofing the sender address in an email to appear as a reputable source and request sensitive information

places where computer are used​

Answers

Answer:

Banks and financial.

Business.

Communication.

Defense and military.

Education.

Internet.

Medical.

Transportation.

etc..

Answer:

businesses, schools, colleges, medical offices, banks.

8.9 Lesson Practice edhesive

Answers

Answer:

1. search

2. False

3. Our algorithm did not find the element we were looking for.

Explanation:

Write an application that combines several classes and interfaces.

Answers

Answer:

Explanation:

The following program is written in Java and it combines several classes and an interface in order to save different pet objects and their needed methods and specifications.

import java.util.Scanner;

interface Animal {

   void animalSound(String sound);

   void sleep(int time);

}

public class PetInformation {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       String petName, dogName;

       String dogBreed = "null";

       int petAge, dogAge;

       Pet myPet = new Pet();

       System.out.println("Enter Pet Name:");

       petName = scnr.nextLine();

       System.out.println("Enter Pet Age:");

       petAge = scnr.nextInt();

       Dog myDog = new Dog();

       System.out.println("Enter Dog Name:");

       dogName = scnr.next();

       System.out.println("Enter Dog Age:");

       dogAge = scnr.nextInt();

       scnr.nextLine();

       System.out.println("Enter Dog Breed:");

       dogBreed = scnr.nextLine();

       System.out.println(" ");

       myPet.setName(petName);

       myPet.setAge(petAge);

       myPet.printInfo();

       myDog.setName(dogName);

       myDog.setAge(dogAge);

       myDog.setBreed(dogBreed);

       myDog.printInfo();

       System.out.println(" Breed: " + myDog.getBreed());

   }

}

class Pet implements Animal{

   protected String petName;

   protected int petAge;

   public void setName(String userName) {

       petName = userName;

   }

   public String getName() {

       return petName;

   }

   public void setAge(int userAge) {

       petAge = userAge;

   }

   public int getAge() {

       return petAge;

   }

   public void printInfo() {

       System.out.println("Pet Information: ");

       System.out.println(" Name: " + petName);

       System.out.println(" Age: " + petAge);

   }

   //The at (email symbol) goes before the Override keyword, Brainly detects it as a swearword and wont allow it

   Override

   public void animalSound(String sound) {

       System.out.println(this.petName + " says: " + sound);

   }

//The at (email symbol) goes before the Override keyword, Brainly detects it as a swearword and wont allow it

  Override

   public void sleep(int time) {

       System.out.println(this.petName + " sleeps for " + time + "minutes");

   }

}

class Dog extends Pet {

   private String dogBreed;

   public void setBreed(String userBreed) {

       dogBreed = userBreed;

   }

   public String getBreed() {

       return dogBreed;

   }

}

You plan to make a delicious meal and want to take the money you need to buy the ingredients. Fortunately you know in advance the price per pound of each ingredient as well as the exact amount you need. The program should read in the number of ingredients (up to a maximum of 10 ingredients), then for each ingredient the price per pound. Finally your program should read the weight necessary for the recipe (for each ingredient in the same order). Your program should calculate the total cost of these purchases, then display it with 6 decimal places.

Example There are 4 ingredients and they all have a different price per pound: 9.90, 5.50, 12.0, and 15.0. You must take 0.25 lbs of the first, 1.5 lbs of the second, 0.3 lbs of the third and 1 lb of the fourth. It will cost exactly $29.325000.

Answers

Answer:

In Python:

prices = []

pounds = []

print("Enter 0 to stop input")

for i in range(10):

   pr = float(input("P rice: "+str(i+1)+": "))

   pd = float(input("Pound: "+str(i+1)+": "))

   if pr != 0 and pd != 0:

       prices.append(pr)

       pounds.append(pd)

   else:

       break

amount = 0

for i in range(len(pounds)):

   amount+= (pounds[i]*prices[i])

print("Amount: $",amount)

Explanation:

These initialize the prices and pounds lists

prices = []

pounds = []

This prompts the user to enter up to 10 items of press 0 to quit

print("Enter 0 to stop input")

This iterates through all inputs

for i in range(10):

This gets the price of each item

   pr = float(input("P rice: "+str(i+1)+": "))

This gets the pound of each item

   pd = float(input("Pound: "+str(i+1)+": "))

If price and pound are not 0

   if pr != 0 and pd != 0:

The inputs are appended to their respective lists

       prices.append(pr)

       pounds.append(pd)

If otherwise, the loop is exited

   else:

       break

This initializes total to 0

amount = 0

This iterates through all inputs

for i in range(len(pounds)):

This multiplies each pound and each price and sum them up

   amount+= (pounds[i]*prices[i])

The total is then printed

print("Amount: $",amount)

which software manages the functioning of the entire computer system

Answers

it’s the operating system

list out and discuss the characteristics of big data​

Answers

Answer:

Volume: Volume refers to the sheer size of the ever-exploding data of the computing world. It raises the question about the quantity of data.

Velocity: Velocity refers to the processing speed. It raises the question of at what speed the data is processed.

Variety: Variety refers to the types of data.

Explanation:

Why are microcomputers installed with TCP/IP protocols?

Answers

Answer:

microcomputers are installed with TCP/IP protocols because its a set of standardized rule that allows the computer to communicate on a network such as the internet

Explanation:

This is a glitch ? 


 











































Answers

Answer:

I think no...Brainly might not allow unique text's.

Answer:

dunno???

Explanation:

I want to know the basic of Excel

Answers

Answer:

Use Pivot Tables to recognize and make sense of data.

Add more than one row or column.

Use filters to simplify your data.

Remove duplicate data points or sets.

Transpose rows into columns.

Split up text information between columns.

Use these formulas for simple calculations.

Get the average of numbers in your cells.

This is gonna be very long but I have no idea what to do, I'm confused.

Course Project Part 4: Conducting the Experiment and Recording Data
After much preparation, you are finally ready to begin conducting your experiment. Due to all the hard work you put into your literature review and planning your procedures, the steps that you need to take to conduct your experiment successfully have already been set. While you conduct your experiment, you will need to keep a daily journal where you record the activities you undertake that are relevant to the experiment and also where you record any data that you collect. This is your experiment log and serves as a record of your work while also allowing you to make a record of any changes or modifications you may need to make during the experiment.

Conducting the Experiment and Keeping an Experiment Journal
Following the procedure that you established in the previous part of this project, set up your experiment and begin running it. Every day while your experiment is running you will make an entry in your journal. Record what activities you completed (refer to your outlined procedure to make sure you are following the procedure that you established), any modifications that had to be made to your set up or procedure, and any observations or data you collect. Even on days when you do not collect data (depending on your experiment, there may not be data collection every day), make an entry in your journal. Each journal entry should be clearly labeled with the date on which it was entered. You do not need to type up all your entries, but make sure that your journal entries are neatly written, as they will be evaluated by your instructor.

Depending on the topic and design of your experiment, the period of time during which you conduct and record your experiment may range from one to several weeks. In consultation with your instructor, you will establish a timeline for the evaluation of your journal. If you are running a shorter experiment, your journal may be evaluated several times over the course of one or two weeks. If your experiment takes longer to complete, you may have a weekly review over the course of a month. Follow the guidelines provided by your instructor.

Collecting Data
All experiments generate data. This data allows the scientist to evaluate the success of the experiment and make interpretations about the results generated by the investigation. When you record your data, you must collect it as consistently as possible. Returning to the plant experiment, it would be best to measure the plants on a set schedule. For example, you might choose to measure the plants every Thursday at 3 pm. It is important to measure the plants at the same time each week so that the difference in growth you might observe is a reflection of the experimental condition, not simply longer growing time. Additionally, it is important to use the same instruments to collect data. The plants should be measured with the same ruler or measuring tape each time. This helps reduce any error or bias that might be introduced by using different instruments to make measurements. Whatever measurements or data you collect, do so in a consistent manner. Use the same instruments, the same scales, and record the data in a standardized manner. It is also a good idea to record your experiment using photographs. This will help you later during analysis and provides information for others who might be interested in recreating your experiment. Record your data in your experiment journal, where it will be reviewed by your teacher on an on-going basis. Submit your journal to your instructor according to the schedule you have established together.

Someone answered before but gave a link and I don't trust it

Answers

for such experiment, you do it with care and to acquire and determine to put experience in it

Explanation:

because without you been or using experience the experiment will not correct

The five types of personal computers are: desktops, laptops, tablets, smartphones, and

Answers

Answer:

microcomputers

Explanation:

Other Questions
PLEASE HELP WITH MY BIOLOGY Explain the effects if the energy from the sun was blocked for 48 hours and how this would relate to the process of photosynthesis. Flight 101, headed straight north, climbed to 30,000 feet and started its cruising speed of 360 mph 10 miles south of the point directly above our location. Flight 222, headed straight west, already cruising at 30,000 feet at 300 mph, was 5 miles east of the point above us at that time. Clearly, the paths of the planes intersect directly above us. Do they collide? Parametrize the linear paths and give the times when they are at the intersection point. By how many seconds do they miss each other? when people are united by common history and culture, they belong to what What was the difference in the wealthyand the poor during the Qin Dynasty? During the French colonial period, why were African slaves in Louisiana able to keep some of their traditional culture? Select the two correct answers.They practiced Voodoo.They came from the same region of Africa.Most arrived in the state within a short period of time.They all came from Haiti.They learned to speak French in Africa. Describe fully the singletransformation that takesshape A to shape B. Suppose one serving of Vegetables is 3/4 cup. How many servings are there in 35 cups? The point (-4, 6) is a solution to which of the following system ofinequalities?x + 2y > 8 and - 4x y > 10x + 2y < 8 and - 4x - y = 10 x + 2y = 8 and - 4x - y s 10x + 2y = 8 and - 4x y < 10 What is the name of the segment AB!? Will mark brainliest. helppppppppppp meeeeeeeeeeee!!! Find the missing angle measure in an obtuse triangle with angle measures of 10 degrees and 15 degrees The Crusades were a series of wars motivated mainly by a A. misunderstanding B. religion C. politics D. money mcda=11, what is mcba 40 N 95 W what is the longitude and latitude Can someone edit this please!!!!My favorite color is yellow, not many people know why. They think it is because it is bright. But no it is not just for that reason. One of my favorite people has this saying Today is a good day to have a good day And I have no idea why I think of yellow when I think of that but I do! And I also love the summer time, like it might just beat volleyball. When I think of summer I think of big smiles, bonfires, long nights, days out on the lake, tan lines like nobody's business, sunflowers, lemonade, pigtails, ice cream etc. When I think of those things it makes me happy and excited. Which reminds me of yellow, again I don't know why. Yellow, yellow, yellow :) propose a definition for digestion using the following terms; nutrients, food, liquids, solids, transformation and digestive juices What is the probability of gettting a odd number out of 1 2 3 4 The picture shows a carousel. The carousel spins while the horses move up and down. A student determines toeach horse completes one up-down cycle in 30 seconds. The student rides a horse on the carousel for 2 minutewhich equals 120 seconds.raal