4.2 Code Practice: Question 1

Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the count of how many numbers were entered.

Sample Run

Enter a number: 1
Enter a number: 41
Enter a number: 36
Enter a number: 25

Sum: 103
Numbers Entered: 4

Hint: If you get an EOF error while running the code you've written, this error likely means you're asking for too many inputs from the user.

Answers

Answer 1

In python:

total = 0

i = 0

while total <= 100:

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

   i += 1

   total += number

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

print("Numbers Entered: {}".format(i))

I hope this helps!


Related Questions

What does this loop that uses a range function do?

for i in range(7, 15)
print("goodbye")

O It prints "goodbye" 8 times, numbered from 7 through 14.
It prints "goodbye" 9 times, numbered from 7 through 15.
O It prints "goodbye" 9 times.
O It prints “goodbye" 8 times.

Answers

This code will print "goodbye" 8 times

Answer:

B. It prints "goodbye" 9 times, numbered from 7 through 15

Explanation:

Use the drop-down menus to complete the statements about creating a table of contents in Word 2016.

To use the table of contents feature in Word, a user must have already created
in the document.

The Mark Table of Contents Entry option is used for
marking nonheading text for the table of contents.

On the Table of Contents dialog box, the
button can be used to change font styles.

Answers

Answer:

1.headings and subheadings

2.manually

3.options

Answer: 1.Headings and Subheadings

2.Manually

3.Options

Explanation: Just did it on e2020.

The ____, which amplified weak electrical signals, enabled electrical sound recording.

Answers

Answer:

Radio

Explanation:

Why is it important to proofread your documents ?

Answers

Proofreading can make sure that your document is completely free from errors to a high standard.

Answer:

It's important to proofread your documents to make sure that you don't have any avoidable mistakes.

Explanation:

Avoidable mistakes include grammar, sentence structure, and word choice.

20
Select the correct answer.
Part of social health means that you make positive contributions to your community,
ОА.
True
OB
False
Reset
Next

Answers

Answer:

true

Explanation:

because my 8 ball said so

Answer:

True

Explanation:

For your biology class, you will be giving a presentation of the findings of a plant growth experiment. Which application is best suited for this presentation?


Writer or Word


Impress or PowerPoint


Notepad or Paint


Calc or Excel

Answers

Answer: Powerpoint

Explanation: Easy to give graphs and add pictures. You can also add shapes to create a bar graph if needed.

Answer:

Calc or Excel

Explanation:

4.1 Code Practice: Edhesive

Answers

In python 3:

while True:

   name = input("Please enter a name: (Nope to end) ")

   if name == "Nope":

       break

   print("Nice to meet you {}".format(name))

I hope this helps!

   

The program is an illustration of while loops.

While loops are used to perform iterative operations, until the condition is met

The program in Python, where comments are used to explain each line is as follows:

#This prompts the user for name

name = input("Please enter a name (Nope to end) ")

#This checks if input is "Nope"

while name.lower()!="nope":

   #If no, this prints the greetings

   print("Nice to meet you",name)

   #This prompts the user for another input

   name = input("Please enter a name (Nope to end) ")

Note that the loop is repeated until the user enters "Nope" or "nope"

Read more about while loops at:

https://brainly.com/question/18430675

Which sentences describe the value of a conditional statement? Check all that apply.

It allows a programmer to designate a portion of the code that will be run only when a condition is met.

It creates new program code when a condition is met.

It allows a programmer to set a condition that must be met.

It incorporates decision-making into a program.

Answers

Answer:

134

Explanation:

Edgenuity

Answer:

1. It allows a programmer to designate a portion of the code that will be run only when a condition is met.

3. It allows a programmer to set a condition that must be met.

4. It incorporates decision-making into a  program.

Explanation:

A variety of fonts may be used in letter writing as long as the font size is 12 points.
True
False

Answers

False MLA format is Times New Roman font, size 12, double spaced.

Answer:

False

Explanation:

William would ike to sort a list of items after the data is already entered Which method is NOT an available sort option? text O number O date Osymbol​

Answers

Answer:

symbol

Explanation:

edge2020

Answer:

symbol

Explanation:

took the test

Which of the following might cause a mobility impairment that limits computer use? Select 3 options.
a color blindness
Odyslexia
O neurological issue
injury
O genetic issue

Answers

Explanation:

A color blindness , injury .

Answer:

neurological issueinjurygenetic issue

Explanation:

The question is about mobility impairment. Color blindness and dyslexia have to do with vision, so rarely cause mobility issues related to computer use. Rather they would cause issues related to reading the screen.

The remaining three choices are the ones you want.

Bill has several workbooks open, and he would like to see them all side by side on the screen. Which option on the
Arrange All menu should he use?
Tiled
Cascade
Horizontal
Vertical

Answers

Answer:

tiled

Explanation:


What is a goal?
What is a strategy?
What are tactics?
hy is it important for a goal to be specific?

Answers

A goal is an aim you want to achieve
Strategy is a plan to your achievement
Tactics are is an action carefully planned
A goal is important to be specific cuz it helps u focus on your specific task

Which option ensures that a page break is automatically inserted ahead of a specific paragraph or heading?

the Page Breaks Before option in the Paragraph dialog box
the Keep With Next option in the Paragraph dialog box
the Keep Lines Together option in the Paragraph dialog box
All of the above options are correct.

Answers

Answer:

All the above options are correct

Answer: d

Explanation:

100 POINTS PLEASE HELP Ken Thompson and Dennis Ritchie co-created which operating system?

Answers

Answer:

UNIX operating system

Explanation:

Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, development starting in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.

Answer:

the UNIX

During the 1960s to 1970s, Bell Labs colleagues Ken Thompson and Dennis Ritchie developed UNIX, a multi-tasking, multi-user operating system alternative to the batch processing systems then dominating the computer industry.

Explanation:

Other Questions
Does changing the number of protons change the identity of the element you have built ? A purse is on sale for $25.60. If the original price of the purse was $32.00,what is the percent of discount? What is the volume, in liters, of 1.40 mol of oxygen gas at 20.0C and 0.974 atm? The sum of two consecutive numbers is 253. Which of the following equationsdescribes this situation?A) 3n-1= 253D) 2n+2= 253B) 2n+1= 253E) n+2= 253C) 2n= 253 if pooh bear got a bucket of honey and hops got one how much do I need to steal from hops >;3 Solve x^2 = 64, where x is a real number.Simplify your answer as much as possible.If there is more than one solution, separate them with commas.If there is no solution, click on "No solution". Write a brief paragraph discussing whether or not you agree or disagree with this statement. Give evidence for your claims.Schools should have the right to monitor students social media sites to look for instances of bullying, drugs or violence. 6. Doug has been evicted from his home. He sits on the street corner with a homemadesign asking people to give him food. Doug is wearing only shorts and a t-shirt in thesnowy afternoon. Doug plays his harmonica in hopes of attracting some donors. Onekind soul brings him a cup of hot chocolate. A passerby yells at Doug to "Get a job!"upsetting Doug so much that he spills the steaming hot chocolate on his leg. plz help answer both will mark brainest What part of speech is the word in italics?Shelly's beautiful dance thoroughly captivated the *audience*. Noun Verb Adverb Adjective List one thing you notice from this sheeps heart Brainliesting the best You are babysitting for your younger cousins. Give them two formal commands in Spanish. One has to be affirmative and one negative. How do I write Domain and Range in inequality notation? A high school track is 9.76 meters wide. It is divided into 8 lanes of equal width fortrack and field events. How wide is each lane? True or False: A is the hanging wall and B is the foot wall. Naomi bought a dress on sale for $24. Naomi bought the dress for 60% of the original price. Which equation shows how to find the original cost of the dress?A.0.60x = 24B.0.40x = 24C.24x = 60D.60 24 = x How were reservations supposed to Americanize" the Plains tribes? Mr. Webb had 90.66 feet of wood. If he gave Jim 15.4 feet, Allison 20.69 feet and Cory32.02 feet, how much does he have left? Jillian has been updating the design of a media streaming website. She wonders if users will spend more time on the site with the new design, so she designs a study. She starts with a random sample of 1,000 users and randomly assigns half of them to the old design and half of them to the new design. After a week, she notices that users with the new design spend significantly longer on the site than the users with the old design. Can we conclude that the new design caused users to spend more time on the site? Why? Choose 1 answer: A)Yes because the sample size was large, B) Yes, because the users were randomly assigned to treatment and control groups, C) Yes, because the users were randomly selected, D) Not necessarily, because the sample size was too small, E) Not necessarily, because this wasnt an experiment. Martin charges $15 for every 5 bags of leaves he rakes last weekend he raked 20 bags of leaves how much money did he earn