PLEASE I NEED HELP ASAP PLEASE PLEASE!!!

For a list of numbers entered by the user and terminated by 0, find the sum of the positive numbers and the sum of the negative numbers. C++ language only.

Answers

Answer 1

Answer:

Following are the program in the Python Programming Language

#set variables to 0

positive_sum=0  

negative_sum=0  

#print message  

print("Enter 0 to terminate")  

#set the while loop  

while(True):  

#get input from the user  

num=float(input("Enter positive or negative numbers: "))  

#set if statement to check condition  

if(num==0):  

  break  

elif(num>0):  

  positive_sum+=num  

else:  

  negative_sum+=num  

#print output with message  

print()  

print("sum of positive numbers: ", positive_sum)  

print("sum of negative numbers: ", negative_sum)  

Output:  

Enter 0 to terminate  

Enter positive or negative numbers: 1  

Enter positive or negative numbers: 3  

Enter positive or negative numbers: 5  

Enter positive or negative numbers: -7  

Enter positive or negative numbers: -2Enter positive or negative numbers: 0  

sum of positive numbers:  9.0  

sum of negative numbers:  -9.0

Explanation:

Here, we set two integer data type variables "positive_sum", "negative_sum" and initialize to 0.

Then, we set the while infinite loop inside the loop.

Set a variable "num" and get input from the user in it.

Set the if conditional statement and check condition the variable "num" is equal to 0 then, loop will terminate.

Set the elif statement and check condition the variable "num" is greater than 0 then, add that input and store in the variable "positive_sum"

Otherwise, add that input and store in the variable "negative_sum".

Finally, we print the output with the message.


Related Questions

how to send an email without showing recipients outlook

Answers

Answer:

Outlook. When you open a new blank email in Outlook, click on the “Options” tab. From there, you'll want to select the Bcc field in the message header. This is your “blind carbon copy” option, meaning that your email recipients will not see other names on the list.

Explanation:

If you want to use the randint function, you need to include import random in your program.
A. True
B.False

Answers

Answer:

A. True

Explanation:

Because to use randint (which means random integer) you need to import random module.

which camera is interchangeable

freeform

hybrid

DSLR

point and shoot

Answers

Answer:

DSLR

Explanation:

Double check my answer

Two primary disadvantages to the ______ BN type are that the routers in the network impose time delays, and routers are typically more expensive and require more management than switches. Group of answer choices

Answers

Answer: Routed backbone disadvantages are time delays and more expensive than switches

Explanation:

python Better Password Prompt
Write a program that uses a loop and a half to prompt a user for a password. You should prompt the user for the password. If they get it correct, break out of the loop. If they don’t get it correct, you should give them an error message and ask again.

Sample Run:

Enter password: 123123
Sorry, that did not match. Please try again.
Enter password: password
Sorry, that did not match. Please try again.
Enter password: CODEHS
Sorry, that did not match. Please try again.
Enter password: abc123
You got it!
Note: You need to set SECRET to abc123 to run the tests

Answers

We use an indefinite while loop to keep the user entering the password. In the loop, we use if-else structure to check the password. If it is "abc123", the password is found and stop the loop using a break. Otherwise, the password is not correct. Note that since we do not use any break statement in the else part, the loop will continue asking for the input

Comments are used to explain each line of the code.

You may see the output in the attachment.

#set the SECRET

SECRET = "abc123"

#create a loop

while True:

   

   #ask the user to enter a password

   password = input("Enter password: ")

   

   #check if the password is equal to SECRET

   # if it is, state that password is correct and stop the loop using a break

   # otherwise, state that password is not correct

   if password == SECRET:

       print("You got it!")

       break

   else:

       print("Sorry, that did not match. Please try again.")

Here is another question related to the loops:

https://brainly.com/question/25694810

Write a 20 charecter poem! for points! :)

Answers

you are wonderful as you are blue you are as blue as the sky the sky is beautiful as u are too you are red as Rose's and Rose's are full of you winter time is the mood full of winter and snow

This computer is used by touching your finger.
A Desktop
C. Mainframe
B. Laptop
D. Tablet​

Answers

Answer:

a tablet because it's controlled by the touch of a finger.

By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?

Answers

By the mid-1990s, the revenue generated from video games was two and a half times the revenue generated from movies.

Research shows that in 1994, the revenue generated from arcades in the United States was about $7 billion quarterly while the revenue generated from home console sales was about $6 billion dollars.

When combined, this revenue from games was two and a half times the amount generated from movies.

Learn more about video games here:

https://brainly.com/question/8870121

Answer:

Revenue made from video game sales still lagged behind revenue made from movies.

What does the Finder do?


locates files

organizes computer folders and files

opens applications

empties the Trash

deletes files

turns off the computer

Answers

locate files , open applications

x = 9 % 2if (x == 1):  print ("ONE")else:  print ("TWO")

Answers

Answer:

ONE

Explanation:

It prints one because % is modulus, which is remainder division. It divides the numbers provided and returns the remainder of the division. 9 / 2 = 4 with 1 remainder, which leads us to our answer.

PA theme is a major message that a writer convoys through a text. you have explored many themes in the hobbit one theme in the novel is that good has the ability to triumph over evil. using specific examples from the text, explain how this theme develops over the course of the novel

Answers

Answer:

The Hobbit’s main theme is Bilbo’s development into a hero, which more broadly represents the development of a common person into a hero. At the beginning of the story, Bilbo is timid, comfortable, and complacent in his secure little hole at Bag End. When Gandalf talks him into embarking on the quest with Thorin’s dwarves, Bilbo becomes so frightened that he faints. But as the novel progresses, Bilbo prevails in the face of danger and adversity, justifying Gandalf’s early claim that there is more to the little hobbit than meets the eye.??????

Explanation:

What is the interface of an app?
a storyboard software
the part the user sees
a sketch of your idea
a testing environment

Answers

Explanation:

An application interface or user interface ,is the set of features an application provides so that user may supply input to and recieve output from,the program.

Tom is not sure how to code contents such as title and meta elements. These are coded as ____ elements.

Answers

Answer:

Tom is not sure how to code contents such as title and meta elements. These are coded as head elements.

Hope that helps. x

Answer:

head elements

Explanation:

answer is above

what is the term for delivering an application over the internet called?

Answers

Answer:

Cloud computing

Explanation:

The termnology which is used to describe the delivering of an application over the internet is called SaaS.

What is SaaS?

SaaS is an acronym for Software as a Service and it can be defined as a type of cloud computing delivery model that typicaly involves developing and making licensed software applications available to end users on a subscription basis and over the Internet, especially by centrally hosting these software applications within the cloud or through a third-party (vendor).

This ultimately implies that, Software as a Service (SaaS) is a termnology which is used to describe the delivering of an application over the internet.

Read more on SaaS here: https://brainly.com/question/24852211

Get ready to be the Quizmaster! You are going to design your own Python game show in the style of a quiz.

Think of a genre (science, music, math, sports, video games, etc.) and create at least 10 questions. You can decide whether you want to make the questions multiple choice or not. Then go to OnlineGDB to get programming.

Your quiz program must have the following items:

It must start by asking the user what their name is and welcoming them to your quiz. It pays to be polite!
Set up a variable to keep score. It is up to you how to design the points system. Will you give them 10 points for a correct answer and 0 for an incorrect answer? Or perhaps you will be tough and take away points for an incorrect answer!
Ask your 10 quiz questions. If they get a question wrong, be sure to tell the user what the correct answer was. Then adjust the score appropriately, depending on whether their answer was right or wrong.
At the end of the program, tell the user their score.
Need an extra challenge? Try the following. These are not required.

Research how to use the lower() or upper() functions to allow the user to capitalize their answer (or not) and still receive credit as a correct answer.
Tell the user what percentage of the questions they got correct!
Make sure to click the save button. Then click Share and copy the link to your program. Paste it in a word processing document and submit it using this unit’s dropbox.

Answers

Answer:

"Are apples Magenta?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Teal?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Gray?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Green?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Cyan?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

]

Questions(Question prompts[0], "a")

Questions(Question prompts[1], "c")

Questions(Question prompts[2], "c")

Questions(Question prompts[3], "c")

Questions(Question prompts[4], "c")

Questions(Question prompts[5], "b")

Questions(Question prompts[6], "c")

Questions(Question prompts[7], "c")

Questions(Question prompts[8], "a")

Questions(Question prompts[9], "c")

Explanation:

Answer:"Are apples Magenta?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Teal?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Gray?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Green?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

"Are apples Cyan?"\n(a) yes\n(b) sometimes\n (c) no\n\n",

Explanation:

Which of these problems is correct if the numbers are binary numbers?Group of answer choices1 + 1 = 21 + 1 = 100 + 0 = 11 + 0 = 10

Answers

Answer:

The last one is correct.  

Explanation:

In cell a10 enter a formula using or to display true if net profit before tax in 2019 (cell b5) are greater than 750000(seven hundred, fifty thousand) or net profit before tax in 2020 (cell c5) are greater than 750000 (seven hundred, fifty thousand). use cell references where appropriate and enter the arguments exactly as described in this question.

Answers

The OR Excel function is a function that is used to test several conditions in one statement.

The Excel formula to display true based on the conditions in cell A10 is =OR(B5>750000,C5>750000)

From the question, we have:

Cell B5 represents the net profit before tax in 2019Cell C5 represents the net profit before tax in 2020

The syntax of the OR logical function is: =OR([conditions])

So, the Excel formula to display true based on the conditions in cell A10 is =OR(B5>750000,C5>750000)

Read more about Excel formulas at:

https://brainly.com/question/14820723

A PIN of four digits has 10,000 (or 104) combinations. This could theoretically be guessed by a computer in milliseconds. The most popular PIN numbers are 1111, 1234 and 0000 making up around 20% of PIN numbers. Anything beginning with 19XX is also very common, as is 2580. Why?

Answers

Answer:

19xx could be a birth year, easy to remember

2580 is easy to remember because on a keypad the numbers are aligned vertically.

Note that from the statement above, one can say that 19xx is common as it is linked with birth year and thus easy to recur and also 2580 is very easy to recur because on a keypad the numbers are soften matched vertically.

What is pin about?

Pin or digit code are often used in our debit cards, credit cards and in a lot of mobile phones for security purposes.

Note that Note that from the statement above, one can say that 19xx is common as it is linked with birth year and thus easy to recur and also 2580 is very easy to recur because on a keypad the numbers are said to be aligned vertically.

Learn more about digits code from

https://brainly.com/question/3118454

#SPJ9

James works on history for 9/10 of an hour he works on English for 3/10 of an hour how much longer does James work on history than on English

Answers

james works 6/10 more of an hour

What is the output for the following program?
numA = 4
while numA <12:
numA = numA + 3
print(numA)
Output:

Answers

Answer:

13

Explanation:

int numA = 4;

whilie (numA < 12){

  numA += 3;

}

System.out.print(numA);

numA          numA < 12

  4                   true ⇒ numA increases by 3, loop continues

  7                   true ⇒ numA increases by 3, loop continues

  10                 true ⇒ numA increases by 3, loop continues

  13                 false ⇒ loop stops, program them prints out value of numA

Write a program which will -

• Enter the score the student got in the test.
• Enter the maximum number of marks for the test.
• Divide the score by the maximum to work out the percentage.
• Check to see if the percentage is greater than 52. If it is then say "well done you have at least a grade 5"
• If the percentage is less than 52 then display "Unlucky, you need to revise more for the next test."
Will give out brainliest :)

Answers

Answer:

down below

Explanation:

score = input() # gets student's score input

max = input() # gets max number

percent = (score/max)*100 # multiply by a hundred to get percentage

if percent > 52: # checks if percent is greater than 52

  print("well dont you have at least a grade 5")

else # if percent is less than or equal to 52 it will print this instead

  print("Unlucky, you need to revise more for the next test.")

THIS PART IS NOT CODE:

make sure you indent/tab the print statements or else you'll get an error

why does my ps4 keep disconnecting from the internet

Answers

Answer:

It could be a variety of reasons depending on your form of connection. Wireless, it could be distance from router causing packet loss or disconnection. Wired, damaged or poor wire, or bad internet. What do you know about your connection?

Additional Activities Direction: List down all the safety and work procedures in using newly purchased gadget. Write your answers on a separate sheet of paper.​

Answers

Answer: Keep your phone away from your body and head. Turn off your phone or turn on airplane mode at bedtime. Use headsets, preferably air tube, and speaker phone when possible. Don't carry your cell phone in your bra, shirt, or front pants pocket, especially if you're pregnant.

Explanation:

Aliaa and Zhang Li are tennis-playing robots. Aliaa is 715\,\text{cm}715cm715, start text, c, m, end text from Zhang Li and 2{,}200\,\text{cm}2,200cm2, comma, 200, start text, c, m, end text from the far corner. Zhang Li measures an 91\degree91°91, degree angle between Aliaa and the far corner, as shown.


From Aliaa's viewpoint, what is the angle between Zhang Li and the far corner?

Do not round during your calculations. Round your final answer to the nearest degree.

Answers

Answer:

70

Explanation:

Law of Sines.

sin(91)/12 = sin(x)/715

x=19

180-91-19=70

What economic impact will this disaster have on people? Select three options.


People will have to rebuild their homes and communities.

People will have to move away from friends and family after a flood.

People will have to relocate and buy or rent new homes.

People will need to find new jobs to replace jobs destroyed in the flood.

People will be angry with the government for lack of warning about the flood.

Answers

Answer:

1, 3, and 4

Explanation:

Those are the only ones that has anything to do with money.

How many passes will it take to find 16 using a binary search?

2, 4, 6, 8, 10, 12, 14


3

4

2

1

Answers

Answer:

1

Explanation:

Binary search is a useful approach for reducing a list of items. It divides the section of the list that might contain the item in half repeatedly until there is only one viable position left. Thus, option D is correct.

What using a binary search?

Recursive and iterative methods. The main distinction between the two approaches is that the recursive approach utilizes O(logN) space complexity, whereas the iterative approach uses O (1).

On sorted arrays, binary search operates.The binary search process begins by comparing a middle-of-the-array member to the desired value.

Therefore, It is necessary to locate element 59 in a 10-digit array. The index of the elements ranges from 0 to 9. The array's centre is now calculated. To do this, divide the index's leftmost and rightmost values by two.

Learn more about binary search here:

https://brainly.com/question/12946457

#SPJ2

how does digital and hybrid computers differ in portability​

Answers

Answer:

Digital computers perform functions like mathimatical,compex calculations. while hybrid computers work with the duo combinations like analog and tempature.

Explanation:

I passed the class A+

yourwelcome :)

thank me if it was correct for you too.

NO links!!! please, In this task, you will prepare the necessary documents required to apply for the job. Conduct research and find out what documents are necessary, such as a résumé, cover letter, and so on. Then, prepare these documents using your information and tailor the documents to the career you have chosen.
the job I chose was a software architect
It's from PLATO

Answers

To apply for a job, you must provide a resume, cover letter, reference list, letters of recommendation, portfolio, and employment certificate.

About these documents we can inform you that:

The Resume presents the most generalized information about the candidate's educational and professional background.The cover letter must be made to show more in-depth information, where the candidate reinforces their most positive points and relevant to the job vacancy.The reference list presents the opinion of other professionals about your professional abilities.The portfolio must be submitted by candidates related to artistic or visual areas and presents the works already created by that professional.The employment certificate must show your professional history in more detail.

Thus, we can state that the application for a job vacancy requires that many documents and information be provided.

More information on writing a resume at the link:

https://brainly.com/question/862477

Who is your favorite Funtime Anamatronic?

Answers

Answer:

ur mom

Explanation:

jk it's prb something like foxy

A small network that consists of devices connected by Bluetooth, such as a smartphone and a computer, is referred to as a ________.

Answers

Answer:

I think is technologies

Other Questions
[Brainliest}Question in picture, Thank You! PLS HELP METhe width of a rectangle is 20m to 2 significant figuresThe length of a rectangle is 40m to 1 significant figureWhat is the shortest perimeter the rectangle could have? Four seconds pass between the first and third flash of a strobe light. The rate at which the strobe flashes is constant. How many seconds will pass between the first and the twelfth flash of the same light? 35. Do you have a more modern fridge than this?-> Is this . The instrument developed for use in the bisected-angle technique istheA) collimator.O B) PID.C) XCP instrument.D) BAI help me with this two I don't understand Solve the following equation for bb. Be sure to take into account whether a letter is capitalized or not. If enough experimental data supports a hypothesis, then it What would allow gays and lesbians to form legal unions with legal benefits? The accounting records of Jamaican Importers, Inc., at January 1, 2021, included the following: Assets: Investment in IBM common shares $ 1,345,000 Less: Fair value adjustment (145,000) $ 1,200,000 No changes occurred during 2021 in the investment portfolio. Prepare appropriate adjusting entry(s) at December 31, 2021, assuming the fair value of the IBM common shares was:_____. 1, $ 1,175,000 2, $ 1,275,000 3, $ 1,375,00 3. Elige correcto o incorrecto. (24 points /2 points each correct sentence)Choose correct or incorrect for each sentence. a. Pedro es un peridico. correcto incorrectob. T coma chocolate. correcto incorrectoc. Mi nombre Ahmad. correcto incorrectod. Vivo en Australia. correcto incorrectoe. Ella es de sueca. correcto incorrectof. Cmo se dice hola en rabe?correcto incorrectog. Laura trabaja una tienda. correcto incorrectoh. La nia es italiano. correcto incorrectoi. Juan tiene doce ao. correcto incorrectoj. Como por la tarde. correcto incorrectok. Qu idiomas hablas?correcto incorrectol. Yo estudio de finanzas. correcto incorre Last year Aft charged $1,220,293 Depreciation on the Income Statement of Andrews. If early this year Aft purchased a new depreciable asset, the effect on Andrews's financial statements would be (all other items remaining equal): Is an area of reddening of a person's skin, sometimes with raised spots, appearing specially as a result of allergy or illness. Find x if AC = 7x - 15 and BD = 4x + 15 Please write down your work on the loose leaf, take a CLEAR picture, and upload here. Thank you. You conduct an experiment in which you expose a rat repeatedly to a 440 Hz tone and an electric shock. After a few trials, the rat begins to show signs of fear in response to the tone. In this paradigm, the electric shock is the ________, while the tone is the ________. Select one: a. unconditioned response; conditioned response b. conditioned response; unconditioned response c. unconditioned stimulus; conditioned stimulus d. conditioned stimulus; unconditioned stimulus which of the following statements best describes the balance of political power among the branches of goverment in the late 1800s Solve for x: 4x+9/2 1/3=3x/0.5 What is the equation of the graph outline the various challenges that you are likely to face during the implementation of a dam.