Write a program that will ask the user to continuously input positive numbers until they type -1 to stop. The program should add up all the number they entered as they are typed ( excluding the -1) then print

example: user enters
8

4.

20

-1
Total: 32

Answers

Answer 1

In python 3:

total = 0

while True:

   number = int(input("Enter a number: "))

   if number == -1:

       break

   total += number

print("Total: {}".format(total))

I hope this helps!


Related Questions

Whats Your Fav Anime ( I Need Recommendations) :c

Answers

Answer:

aot, h x h, seven deadly sins, the promised neveland, haikyuu :)

Explanation:

The Disastrous Life of Saiki Kusou, Erased, Mob Psycho 100, Demon Slayer

What is a benefit of the Name Manager feature?
A) add, edit, filter names you have created
B) add, edit, filter predetermined names for cells
C) create a name from a selection
D) rename a worksheet or a workbook

ANSWER: A

Answers

Answer:Its A

Explanation: edge2020

The benefit of the Name Manager feature is to add, edit, and filter names you have created. The correct option is A.

What is the Name Manager feature?

The name manager feature is present in the ribbon present in the window of the tab. To open this, open click the formula tab. For instance, we sometimes utilize names rather than cell references when working with formulas in Excel.

The Name Manager allows us to add new references, update existing references, and delete references as well.

To interact with all declared names and table names in a worksheet, use the Name Manager dialog box. You could want to check for names with mistakes, confirm the reference and value of a name, see or update the descriptive comments, or figure out the scope, for instance.

Therefore, the correct option is A) add, edit, and filter the names you have created.

To learn more about the Name Manager feature, refer to the link:

https://brainly.com/question/27817373

#SPJ2

What are some ways you deal with stress at school or at home? How could you use those techniques in the workplace?

Answers

Some techniques for managing stress at home and at school that could help in the workplace include active breaks, proper rest, breathing exercises, and yoga.

What is stress?

Stress is a term that refers to the way in which an individual's brain interprets a situation or event that represents difficulty for her life.

One of the main causes of stress is the uncontrolled production and release of hormones that put the individual in an alert attitude that can trigger other symptoms such as:

High blood pressure.Increase in heart rate.Decreased blood sugar levels.

How to combat work stress?

To combat work stress and avoid these symptoms and health conditions, it is advisable to take work situations calmly and relaxed. Additionally, there are activities that can relieve pressure such as:

Practice yoga.Do breathing exercises.Do not take work home.Take active breaks.Rest properly at night.

Learn more about stress in: https://brainly.com/question/1178663

Answer:

take breaks,

Explanation:

When creating an if-else-if statement, you should always make your condition the most specific. What does it mean to put the most specific case first?

Answers

I think an example would help the most with understanding this topic. For instance, if you wanted to return true for numbers between 3 and 10 and return false for everything else.

If we put the most specific case first, we make an if statement for the numbers between 3 and 10 instead of making an if statement for everything else.

When creating an if-else-if statement, what it means to put the most specific case first is:

Applied for only the specific command given by the lines of code

The if-else is a conditional statement that is used in programming to let the compiler know that once a specific condition is met, then the commands in the if statement are executed.

However, if at the end of the code, none of the expressions satisfies the conditions, then no code is executed.

Therefore, putting the most specific case first means that only the specific conditions must be met or else no code is executed.

Read more here:

https://brainly.com/question/19138121

Why do programmers use the Turtle Graphics Module in Python?

To assign a value to a variable
To draw on the screen or create images
To evaluate mathematical statements
To print strings and string literals

Answers

The Turtle Graphics Module in Python is used to draw on the screen or create images.

Answer:

To draw on the screen or to create images

Explanation:

I took the test and it was right

If oldSeq is "1100000111" and segment is "11", then "00000111" should be stored in newSeq. If oldSeq is "0000011" and segment is "11", then "00000" should be stored in newSeq. If oldSeq is "1100000111" and segment is "00", then "11000111" should be stored in newSeq. Write the code segment below. Your code segment should meet all specifications and conform to the examples.

Answers

Answer:

Written in Java

The complete program is as follows:

import java.util.Scanner;

public class RemoveString{

public static void main(String [] args){

String oldSeq, newSeq, segment;

Scanner input = new Scanner(System.in);

System.out.print("oldSeq: ");

oldSeq = input.next();

System.out.print("Segment: ");

segment = input.next();

newSeq=oldSeq.replaceFirst(segment, "");

System.out.print("newSeq: "+newSeq);

}

}

Explanation:

This line declares necessary variables

String oldSeq, newSeq, segment;

Scanner input = new Scanner(System.in);

This line prompts user for oldSeq

System.out.print("oldSeq: ");

This line gets oldSeq

oldSeq = input.next();

This line prompts user for Segment

System.out.print("Segment: ");

This line gets segment

segment = input.next();

This line computes newSeq and it works perfectly for the given instances in the question

newSeq=oldSeq.replaceFirst(segment, "");

This line prints newSeq

System.out.print("newSeq: "+newSeq);

A page of ordinary Roman alphabetic text takes about 2 kilobytes to store (about one byte per letter). So, if I have a 150 page document, how many kilobytes is the document?

Answers

Answer: There are 300 kilobytes for  150 page documents

Explanation:

Given: A page of ordinary Roman alphabetic text takes about 2 kilobytes to store.

i.e. 1 page takes = 2 kilobytes to store.

So, 150 page document takes = 150 x 2 kilobytes  = 300 kilobytes to store

i.e.  150 page document takes 300 kilobytes to store.

Hence, there are 300 kilobytes for 150 page documents.

What is the output of the following program?
if<- 1
repeat
j+1
repeat
display i *j
j<- j+2
until j = 5
if <- i +1
until i = 5

Answers

What subject is this for I’m kind of lost here

Amun manages a database for a school library. If a library visitor wants to read the newest book that the library owns, what is the easiest way for Amun to find that book?

sort the data

go to the shelves and look for the newest book

filter the data

edit the data

if correct get brainliest

Answers

Answer:

letter a

Explanation:

Answer:

query the data

Explanation:

What are two terms for bringing media into a project in Gmetrix

Answers

Answer:

Import and Media Browser

Explanation:Can be found in 2.03 Importing with Media Browser

what is the passcode in rogue squadron for the car

Answers

Answer:

ccrof

Explanation:

2. Explain the importance of observing proper behavior in using social
networking sites.​

Answers

Answer:

Explanation:

4.3 Code Practice: Question 1
Grandma Ester normally gives you hugs for your birthday - one for every year old you are. When you turned 15, she squished you with 15 hugs! This year, she, unfortunately, cannot see you on your birthday, so instead, she wants to send you virtual hugs!

Create a program that prompts the user for how old they are turning and then using a loop, output a virtual hug for every year old they are.

The following prints a single “virtual hug.”

print("**HUG**")

Answers

In python:

age = int(input("How old are you? "))

i = 0

while i < age:

   print("**HUG**")

   i += 1

I hope this helps!

You are able to change the formatting of a table after it is inserted into a placeholder.

True
False

Answers

The correct answers is
True

FIRST ACCURATE ANSWER GET BRAINLIEST THX FOLOW AND 5 STAR RATING When you use the internet to help you find information for a research project, what are you using?

Group of answer choices:

a. An off-line database

b. An online database

c. Data investigation

d. Website inspection

Answers

Answer:

B a online data base

Explanation:

When you use the internet to help you find information for a research project, you are using an online database. The correct option is b.

What is an online database?

A database that can be accessed online is one that is accessible over the Internet. An organization can keep important data accessible to staff members, as well as customers and suppliers, by using an online database.

An eCommerce website or customer relationship management software may be powered by an online database. Data modeling, effective data representation and storage, query languages, sensitive data protection and privacy, and distributed computing concerns like concurrent access and fault tolerance are only a few examples of the practical and formal aspects of database design.

Therefore, the correct option is b. An online database.

To learn more about online databases, refer to the link:

https://brainly.com/question/28964112

#SPJ2

4.9 code practice question 3 edhesive. Anyone know how to do this??

Answers

Answer:

In Python:

x = 0

for i in range (99, 0, -1):

   x += i

   print(x)

Explanation:

It just works.

The required program written in python 3 which prints the running total of integers from 99 backwards is as follows :

sum = 0

#initialize the sum of the integers to 0

for num in range (99, 0, -1):

#loop through integers starting from 99 and take 1 step backward

sum+=num

#add the iterated value to the number in the sum variable and assign the value to the same variable.

print(sum)

#display the value of sum after each iteration.

Therefore, the output of the program is attached below.

Learn more :https://brainly.com/question/19136274

describe how each command is used by matching the command to its purpose

Answers

Answer:

undo-cancels a previously completed action

cut-removes data from its original location and places it on the clipboard

redo- restores a previously canceled location

paste- places data in its final location

copy-duplicated data and places it on the clipboard

Explanation:

Getting started with Excel edg

17. Describe bandwidth and give an example. (5pts)​

Answers

Answer:

a range of frequencies within a given band, in particular that used for transmitting a signal.

Explanation:

you only have a serton amount of bandwidth on your phone

They use trasminaron

What is the coordinate plane?

Answers

Answer:

The 3rd

Explanation:

The Coordinate plane consists of four quadrants and... its defined by the X and Y axis

C because you graph your coordinates with the x-axis and the y-axis

emerging technology that is becoming popular among consumers

Answers

IoT. IoT is driving business changes by providing the data needed to improve marketing, increase sales, and decrease costs, the report found. ...
Artificial Intelligence (AI) ...
5G. ...
Serverless computing. ...
Blockchain. ...
Robotics. ...
Biometrics. ...
3D printing.

Which pair and category is not true?

Answers

Nothing is there to show us

Windows can't find the driver for your digital camera. Where is the best place to find the driver?
Call the local camera store.
The manufacturer's website.
The Window's store.
Search the Internet.

Answers

B. The manufacturing website will be the easiest way to find the driver.

Answer:

The manufactured website

Explanation:

answer all for brainliest
Which online note-taking tool allows students to store information on an extensive back-up system?What is one benefit of using a web clipping tool?The editing and formatting features of eNotes allow students to
their notes to help them process the information.What would eNotes be most helpful for?Tonya wants to keep her class schedule, assignments, and notes all in one place. Which online note-taking tool would be the best one to use?How can students use eNotes to edit their notes? Check all that apply.

They can undo text and redo it.
They can cut, copy, and paste text.
They can insert bullets and tables.
They can search using keywords.
They can evaluate their work.One advantage of using online note-taking tools is that they help students?

Answers

Answer:

d

Explanation:

Answer:

yea its D

Explanation:

got it right on edgy baby

which type of operating system is permanently programmed into a hardware device.​

Answers

Answer:

Depends on what Operating System you are using.

Why is online help important? Select all that apply.
Online help is available 24/7 with your Internet connection
Online help often includes FAQs that cover a wide range of topics.
Some sites also provide reports that include detailed analysis of and solutions to issues that concern
users.
You might meet someone who will become a friend.
DONE

Answers

Answer:

def the first one but id say the second is pretty important too

Explanation:

Answer:

A B C

Explanation:

How do i make a custom answers in Vbscript in notepad

Answers

Answer:

Open notepad.

Write any VB Script code. For example: ...

Save notepad as Test.vbs on desktop. Once you will save notepad with script with the file extension .vbs the notepad will look like this-

Now double click on the file.

Explanation:

Hope this helped, sorry if it didn't

Rest Easy ADDITIONSON, On Wednesday October the 28 We lost a Friend, a Family member, a Loved one.Who Died in his sleep all the fun times we had all the bad times rest easy my friend

Answers

We lost the AMIGOS Beloved Chat RIP

David has created a lot of styles and now his Quick Style Gallery contains styles he no longer uses.

How can he remove the unwanted styles?

Answers

Do you mind giving me more details to this question

step by step solution

Answer:

C) Right-click the style in the Quick Styles Gallery, and select the Remove from Quick Style Gallery option.

Explanation:

what do points do on brainly

Answers

Being marked brainliest and points make you rank up

Answer:

They rank you and allow you to answer and ask questions

Explanation:

WILL MARK BRAILIEST 1111

Answers

Answer:

Flowcharts

Explanation:

Answer:

flow charts

Explanation:

pls add me as bainliest

Other Questions
1. ____________________________ is the source of energy that drives Earth's water cycle. 2. As heat energy was added to the water, it changed state from a _______________________ to a ______________________. This __________________ is also called ___________________________. 3. As more energy is added to the water, the water molecules move _________________________ and farther apart. Josephine bought 2.55 pounds of grapes and 1.27 pounds of blackberries. How manymore pounds of grapes did she buy than blackberries? 14. Lines are alwaysO finiteO solidO non collinearO straight Decide if the reflexive verb is conjugated correctly in the following sentence.Juan y David se vuelve locos. (volverse) what are the string names of a ukulele Who ever answers before I do get brainliest I need help with this please!!!-8 = -(x = 4) During a group discussion, the record keeper ---------------. The Epic of Gilgamesh is believed to be the first Written epicCode of lawsSystem of writing Bob plans to complete a 275-mile trip in 5 hours. What Rate is he planning to travel? Give at least one advantage and one disadvantage of divine right? a salmon moves from a salwater ocean to a freshwater river what takes place in the salmon cells as it moves What is the constant ratio of an exponential curve that passes through the points (0,3)and (5,96)? On your first day at your new company you notice a large sign stating that ethics is one of the companys core values. Of what is this an example? An assumption An espoused value or norm An enacted value or norm An artifact what experminental erros do you expect to encounter when developing an experiment involving hot water On which number line do the points represent negative 4 and 1 over 2 and +3?A: Number line from negative 10 to positive 10 in increments of 1 is shown. Only the whole numbers are labeled. A point labeled R is placed between the 4th and 5th tick marks to the left of 0. A point labeled T is placed on the 3rd tick mark to the right of 0. B:Number line from negative 10 to positive 10 in increments of 1 is shown. Only the whole numbers are labeled. A point labeled R is placed on the 3rd tick mark to the left of 0. A point labeled T is placed between the 4th and the 5th tick marks to the right of 0. C:Number line from negative 10 to positive 10 in increments of 1 is shown. Only the whole numbers are labeled. A point labeled R is placed is between the 4th and 5th tick marks to the left of 0. A point labeled T is placed between the 2nd and 1st tick marks to the left of 0.D: Number line from negative 10 to positive 10 in increments of 1 is shown. Only the whole numbers are labeled. A point labeled R is placed on the 1st tick mark to the left of 0. A point labeled T is placed between the 2nd and the 3rd tick mark to the right of 0.PLEASE ANSWER! I NEED HELP!! What part of the atom determines the identity of an atom? how many electrons are in as3- Question: What is always coming, but never arrives? The first edition hardcover of a new book by a popular writer has a demand which is uniformly distributed between 1 and 2 million. The production and transportation costs per hardcover are $10, and the sale price in bookstores is $25. When the paperback version comes out, the hardcover books go on sale for $5. How many hardcovers should be produced Compare the density of nitrogen gas to the density of argon gas when both gases are at 298 K and 101.3 kPa.