Instructions
Write a loop that input words until the user enters STOP. After each input, the program should number each entry and print in this format:
+1: You entered
When stop is entered, the total number of words entered should be printed in this format:
All done. words entered.
Sample Run
Please enter the next word: cat
*1: You entered cat
Please enter the next word: iguana
#2: You entered iguana
Please enter the next word: zebra
#3: You entered zebra
Please enter the next word: dolphin
24: You entered dolphin
Please enter the next word: STOP
All done. 4 words entered.

Answers

Answer 1

i = 0

while True:

user_input = input("Please enter the next word: ")

if user_input == "STOP":

break

i += 1

print("#{}: You entered {}".format(i,user_input))

print("All done. {} words entered.".format(i))

First we set i equal to zero so that we can keep track of how many words we input.

We set while True so that its a continuous loop until a certain condition is met to break out of the loop.

user_input is set equal to whatever word the user enters.

our if statement tells us to break out of the while loop if the user inputs "STOP"

If the user does not enter STOP i is set equal to itself plus 1. This just means we add one to i for every new word entered.

Then we print whichever word is entered.

After the while loop, we print All done and the quantity of words entered.

Answer 2

Answer:

word = input("Please enter the next word: ")

count = 0

while word != "DONE":

      count += 1

      print("#{}: You entered the word {}".format(count, word))

      word = input("Please enter the next word: ")

print("A total of " + str(count) + " words were entered.")

Explanation:

Assuming this is python, this should help!


Related Questions

Does anyone know the answer for 4.2 Code Practice: Question 1 on edhesive

Answers

Answer:

Question 1

sum=0

count=0

while(sum<=100):

  x=int(input("Enter a nmber"))

  sum=sum+x

  count=count+1

print("Sum: "+str(sum))

print("Numbers Entered: "+str(count))

Question 2

count = 0

pet = (input("What pet do you have? "))

while(pet != "rock"):

 count = count +1

  print("You have a " + pet +" with a total of " + str(count) + " pet(s)")

  pet = (input("What pet do you have? "))

Explanation:

The required program written in python 3 which continues to request user to input a pet name until a rock is entered is as follows :

pet = input('What pet do you have now : ')

#request an input from the user and store in the variable pet

total = 0

#initialize the total number of pets owned to 0

while (pet != 'rock'):

#while loop ensures that program runs until a rock is inputted by the user

total +=1

#adds one to the total after each loop

print('you have a ' + str(pet) + 'with a total of ' + str(total) + ' pet(s)')

#displays the formatted string using the total and pet variables which continues to update

pet = input('What pet do you have now: ')

#requests user to input pet name again as long as rock has not been supplied.

Therefore, an output of the program written is attached below.

Learn more on python programs :https://brainly.com/question/18685986

clue


A game where participants strive to outdo each other and emerge victorious

Answers

Answer:

competitive?

Explanation:

Which variable name is the best to hold the area of a rectangle?
1A
area
AREA
a

Answers

A variable name that is the best to hold the area of a rectangle is known as the area. Thus, the correct option for this question is D.

What is the formula for calculating the area of the rectangle?

The formula for calculating the area of the rectangle is as follows:

Area of the rectangle = Length × Width.

It is only calculated when both the parameters are known in a numerical.

The Area is considered the variable name through which the area of the rectangle best holds in any numerical problem. This is because the area of the rectangle may be changed when the length and breadth parameters have deviated very minutely.

Therefore, a variable name that is the best to hold the area of a rectangle is known as the area. Thus, the correct option for this question is D.

Learn more about the Area of the rectangle:

brainly.com/question/25292087

#SPJ1

Help me
In this excerpt from Franklin D. Roosevelt’s speech “Four Freedoms,” which sentence supports the main idea that the United States can’t afford to stay unprepared during the war?
There is much loose talk of our immunity from immediate and direct invasion from across the seas. Obviously, as long as the British Navy retains its power, no such danger exists. Even if there were no British Navy, it is not probable that any enemy would be stupid enough to attack us by landing troops in the United States from across thousands of miles of ocean, until it had acquired strategic bases from which to operate.

But we learn much from the lessons of the past years in Europe—particularly the lesson of Norway, whose essential seaports were captured by treachery and surprise built up over a series of years.

The first phase of the invasion of this Hemisphere would not be the landing of regular troops. The necessary strategic points would be occupied by secret agents and their dupes—and great numbers of them are already here, and in Latin America.

As long as the aggressor nations maintain the offensive, they—not we—will choose the time and the place and the method of their attack.

That is why the future of all the American Republics is today in serious danger.

That is why this Annual Message to the Congress is unique in our history.

That is why every member of the Executive Branch of the Government and every member of the Congress faces great responsibility great accountability.

Answers

Answer:first sentence

Explanation:

__________operators are used when more than one condition is to be specified. *​

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

AND and OR operators are used when more than one condition is to be specified in where clause of SQL.

AND and OR operators are used where there is more than one condition specified in a SQL's query statement.

However, AND and OR operators also used in other languages when there are more than one condition is specified and needs to be tested logically.  

what are some example of parenting and family relationship in to kill a mockingbird​

Answers

Answer:

A large majority of children in the world look up to an authority figure. In Harper Lee’s To Kill a Mockingbird, she gives examples of different effects of different ways of parenting. The relationships between Atticus and Scout, Dill and his father, and Mayella and Bob Ewell show that the lessons learned or not learned, affect the recipient and can either help them become a good or bad person. These relationships make people think about whether having a parent who teaches bad morals is better than not having a parent at all.

Explanation:

I hope this helped :)

Select the appropriate APA guidelines when typing a research paper.

Keep the margins at one inch on all sides of the paper.
Single space.
Choose 10 point or 12 point font.
Do not indent paragraphs.
Include page numbers on all pages.

Answers

Answer:

Keep Margins at one inch on all sides of the paper.

Choose 10 point or 12 point font.

Include page numbers on all pages.

Explanation:

Because I've done it.

Answer:

Keep Margins at one inch on all sides of the paper.

Choose 10 point or 12 point font.

Include page numbers on all pages.

Explanation:

Need help with this

Answers

Answer:

i say B

Explanation:

because u being professional makes ur company look good

To earn the most possible credit, explain what strategies you might use if you cannot answer a response question purely by recall

Answers

To earn the most possible credit the strategies that you might use would be to search your textbook for a page were the answers to a question are.

The textbooks sometimes have the answer to various questions that are in the book.

A student that has issues recalling what it was can have a quick peek at the answer.

Read more on response questions here:

https://brainly.com/question/25896797

The instructor may give a clue to the correct answer your (he/she's) looking for. Search the rest of the test for possible answers or ideas for possible answers. This ties back with underlining hints you find in the passage

Answer:

Sample Response

Explanation:

Student answers will vary, but should include elements of the following: The instructor may give a clue to the correct answer he/she's looking for. Search the rest of the test for possible answers or ideas for possible answers.

Edge 2022, Please mark Brainliest!

3 items that were on Ken’s “big human bee movie

Answers

Answer:

all my special skills, my top 10 favorite movies, I predicted global warming

hope it helped

Explanation:

what are the social and ethical consequences of emerging technology hard to predict.

Answers

Answer:

The social and ethical consequences of emerging technology are hard to predict since it is truly impossible to see how technology will be applied to situations that have not really occurred yet.  

Explanation:

5. The coordinates of triangle ABC are A(-7, 3), B(3, -7) and C(8. 8)
P is the foot of the perpendicular from B to AC.
a. Find the equation of the line BP.
b. find the coordinates of p
c. find the length of AC and BP​

Answers

Answer:

b

Explanation:

Which of the following is an advantage of algorithmic thinking? Select all that apply.

ill give all my points

Answers

Answer:

yield is good and Jerry brown is a letter from the meaning of his life

New computers were delivered in computer laboratory. The teacher ask your helps in checking and inspecting the components of it. During the inspection process you have noticed that one of the components has damge? What will you do?

Answers

Answer:

the first thing to do is to inform the teacher in charge or the teacher on duty that one of the components has damage and u can also recommend what the teacher can do to it if it is to return it or it can still be managed

Explanation:

plzzzzzzzzzzzzz give me brainiest

During the inspection process, you have noticed that one of the components has damage. You should directly inform the teacher about the damage.

What is a computer laboratory?

Students can learn, use software, complete assignments, and communicate with teachers with the aid of computer laboratories. The ability to gain digital skills necessary in the current workplace without having to buy their own technology and software is what makes these IT laboratories so vital.

The first step is to notify the teacher in charge or the teacher on duty that one of the parts has been damaged. You can also offer recommendations for what the teacher should do with the part, such as whether to return it or whether it can still be used.

Therefore, you discovered damage to one of the components during the inspection procedure. The harm should be immediately reported to the teacher.

To learn more about computer laboratory, visit here:

https://brainly.com/question/9589376

#SPJ2

Which type of system is used to analyze, evaluate, and integrate the output of other systems?
Office automation system
Knowledge based systems
Management information systems
Decision support systems

Answers

Answer:

The management information system.

Explanation:

Had to do some research to help you out on this lol. have a good day.

Samantha wants to create a custom font color for her headers. Put the steps in the correct order from first to last
Select Custom tab.
Select color drop-down.
Select the cell.
Select More Colors.

Answers

Answer:

You first select the cell, then you select the colour drop menu, then more colours and finally the custom tab.

Answer:

Select the cell, select color drop down, select more colors, and select custom tab.

Explanation:

edge2020

If you're NOT fit to drive, you have a responsibility to
A. Stay off the road
B. Do pre-drive exercises
C. Drive with more caution
D. Drive slowly

Answers

Answer:

A. Stay off the road

Explanation:

the answer is a: stay off the road

In SN1 reactions, the intermediate carbocations caneliminate a proton to yield alkenes or react with the solvent toyield ethers. Draw the structures of the byproducts of this typethat would be derived from the reaction of the carbocation derivedfrom 2-bromo-2-methylbutane in ethanol.

Answers

Answer:

See explanation

Explanation:

An SN1 reaction proceeds via a carbocation intermediate. The rate determining step of the reaction is the formation of the carbocation intermediate. Hence the rate equation depends on the concentration of alkyl halide, it is first order reaction.

For  2-bromo-2-methylbutane in ethanol, the polar solvents assists the formation of the carbocation. This carbocation may  undergo SN1 reaction, E1 reaction or ether formation.

The alkene and ether are by products. Their structures are shown as required in the image attached to this answer.

What are company values?

Answers

Answer:

the beliefs, philosophies, and principles that drive your business.

Answer:

the beliefs, philosophies, and principles that drive your business.

Explanation:

A carbon composition resistor having only three color stripes has a tolerance of?

Answers

Answer:

A carbon composition resistor having only three color stripes has a tolerance of 20 percent .

A resistor would normally have four color codings, with the fourth color indicating tolerance. A resistor having no band at all would mean a 20% tolerance.

What is Tolerance of Resistor

Tolerance of resistors means/indicates the amount of deviation or changes a resistor can take and still operate within allowable limits.

There are several types of ResistorFixed Value ResistorsVariable Resistors Resistor NetworksCarbon Film ResistorsMetal Film ResistorsWire wound ResistorsMetal Oxide ResistorsMetal Strip Resistors

Learn more about Resistors here:

https://brainly.com/question/469388

How prepared are you to lead a Internet-based project?

Check all that apply.

I have used an online chat application.

I enjoy solving problems or starting new activities.

I have met with other students online using a web-based conferencing service.

I am comfortable navigating my way around the Internet.

I am an excellent
communicator.

I know how to create and use slide-based presentation software.

Answers

Answer:

Yes all the answers are correct because it says how prepared are you it is asking about you so it is what ever you think

Explanation:

To prepare for leading an internet-based project are:

A. I have used an online talk application.

C. I have met with other students online using a web-based conferencing service.

E. I am an excellent communicator.

F. I know how to create and use slide-based presentation software.

What is an internet-based project?

They are projects that incorporate the usage of the Internet over the course of several lessons. A project that involves students communicating, finding, process, and reporting on material found on external Websites using the Internet.

Nowadays, projects are made on computers because there is so much on the internet and due to technology, information will become very easy to get and its good for students and teachers.

Therefore, the correct options are A, C, E, and F.

To learn more about the internet-based project, refer to the link:

https://brainly.com/question/22076518

#SPJ5

Backing up data on a computer means
a.) removing it
b.) scanning it
c.) saving it externally
d.) saving it internally

Answers

Answer: C. Saving it externally

Explanation:

I know I am late but for the future people the answer is C! :)

- got it right on edge !

- have an amazing day <3

What is the function of the command prompt?

A) to change settings
B) to type in a command
C) to test a user’s identity
D) to get help or support

Answers

The answer is B cause you use it to make commands

Which of the following could result from heat being transferred to a substance?

Answers

Answer: i dont see the following sorry cant help ya

Explanation:

Answer:

The substance's specific heat will increase.

PLZ HELP!!! Which of the following does the error checking for the frame?


CRC

SFD

FCS

LLC

Answers

Answer:

CRC

Explanation:

Answer:CRC

Explanation:

is an error-detecting code is commonly used in digital networks and storage devices to detect accidental changes to raw data. i dont know if this helped

Which field can be used to track the progress on tasks that a user has created?
A. Subject
B. Start date
C. Due date
D. % Complete

Answers

Answer:

i believe it's % complete, sorry if it's wrong

Explanation:

What does the Additional Clock tab do?

pins an extra clock to the desktop
synchronizes the computer with standardized time
displays clocks in other time zones
creates an additional clock for another user

Answers

Answer:

displays clocks in other time zones

Explanation:

it shows how time in other places in the world as well as yours

Where can the slide layout be changed?

from the Edit menu
from the Task pane
from the Slide pane
from the Tools menu

Answers

Anwser

3. From the Slide Pane

Answer:

The Task Pane

Explanation:

This is where the slide layout can be changed.

What is troubleshooting?

A) increasing the power source to your computer
B) eliminating any data collision
C) addressing a technical problem
D) protecting your software from viruses

Answers

C. addressing a technical problem.

Hope this helps.

According to Pew Internet and American Life Project, a Pew Institute study, parents are concerned about which factor?
1.Their children might use the Internet to learn a language that the parents don't speak.
2.Their children might study topics at a higher level than they are being taught in school.
3.Their children are developing greater skills in visual literacy than their parents.
4.Their children are revealing information about themselves to predators.

Answers

Answer:

The answer is the first one.

Explanation:

Other Questions
plsssssss! help! 20 pointsA sample of N2H4 has a mass of 25g. Identify the numerical quantity that is needed to convert the number of grams of N2H4 to the number of moles of N2H4. (You do not need to do the actual calculation.) What determines whether a.com-pound will dissolve in water what law did Andrew Jackson pass in the response to South Carolina's threatening to secede from the Union? HURRY OLEASE ANSWER!!! What is Sharia Law?" Simplify the expression 3x -7x -4 3.67 x 10 the the 9 power Does (-3, 3) make the equation y = -3x true? What changed for african americans after the civilwar? Help please!!!! I only have a couple mins why is staghorn coral so vulnerable Which sentence best explains the central idea of this section of the story? (1 point) Negore knew he needed to kill Ivan and the Russians and thus avenge his brother's death. Negore wanted desperately to tell Ivan the Terrible that his brother had been mauled by a bear, but he didn't dare speak up. Negore's love for and loyalty to his brother outweighed his fear that people would think him a coward. Negore allowed Ivan the Terrible to beat him so his people could win the war against the Russians. I WILL GIVE YOU THE BRAINLIEST AMOUNT OF POINTS What does GPS stand for? Marion left out reasons from her proof. Which reason best supports the statement?PHOTO ABOVE Each shot of the laser gun most favored by Rosa the Closer, the intrepid vigilante of the lawless 22nd century, is powered by the discharge of a 1.33 F capacitor charged to 77.9 kV. Rosa rightly reckons that she can enhance the effect of each laser pulse by increasing the electric potential energy of the charged capacitor. She could do this by replacing the capacitor's filling, whose dielectric constant is 427, with one possessing a dielectric constant of 983.A. Find the electric potential energy of the original capacitor when it is charged. B. Calculate the electric potential energy of the upgraded capacitor when it is charged. Please help and please label and number so I dont get confused thanks Solve for X step by step What is the function of the command prompt? A) to change settings B) to type in a command C) to test a users identity D) to get help or support What can be done to combat racism in our society? Explain. what was a more common way of gathering food for the first Greeks? Hunting,thieving,farming, or fishing Based on the map, what was the main goal of the leauge of nations in the division of the middle east?A) they were seeking trade routes to africaB) they wanted to create spheres of influence in that regionC)they wanted to settle religious differences in the regionD)they wanted to dissolve the assyrian empire who joined forces with the germany during WW1