4.5 Code Practice


Write a loop that inputs 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
#4: You entered dolphin
Please enter the next word: STOP
All done. 4 words entered.

Answers

Answer 1

In python 3:

i = 0

while True:

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

   if word == "STOP":

       break

   i += 1

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

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

I hope this helps!

Answer 2

The program is an illustration of loops.

Loops are used to perform repetitive operations.

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

#This gets input for the first word

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

#This initializes count to 0

count = 0

#The following iteration is repeated until the user enters "STOP"

while word != "STOP":

   #This prints the word entered

   print("You entered",word)

   #This increments count by 1

   count += 1

   #This gets input for the next words

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

   

   

#This prints the count of all words

print("All",count,"words entered!")

At the end of the program, the number of valid inputs is printed.

Read more about similar programs at:

https://brainly.com/question/18283451


Related Questions

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.
Messages can still be blocked at the server level.
Messages cannot be blocked at the network firewall.
Most obvious spam messages will still reach the client computer.

Answers

Answer:

The last one

Explanation I think it is D because all of the other answers are saying what happen if you filter it.

The majority of obvious spam messages will continue to reach the client's computer. The correct answer is D.

What is junk mail?

Email spam, also known as junk email, spam mail, or plainly spam, is an unrequested email sent in mass. The name is derived from a Monty Programming languages sketch that includes the name of a canned pork product is mentioned. Spam is pervasive, unavoidable, and monotonous.

Back out of the Folder or any message folders users are viewing to access the Mailboxes view. The Junk folder is located beneath the Drafts and Sent directories in the Mailboxes view.

The Junk Email Filter settings can be changed in the Junk E-mail Dialogue box. Click Junk in the Deactivate group on the Home tab, and then click Garbage E-mail Options.

Most obvious spam messages will still reach the client's computer. Then the correct option is D.

More about the junk mail link is given below.

https://brainly.com/question/28354330

#SPJ6

The index finger on your right hand types the

Answers

Answer:

J

Explanation:

State The function
of floppy disk​

Answers

Answer:

A floppy disk drive (FDD) is a small disk drive used in computers for data transfer, storage and backup of small amounts of data, as well as installation of programs and driver updates. A floppy disk drive accesses data recorded on small, removable diskettes known as floppy disks.

which of the following sentence uses the correct verb tense A your science class won't meet yesterday. B my mother goes running every day. C currently, my favorite food was ice cream. D the candied yams were delicious tomorrow

Answers

Answer:

Trippeeeee

Explanation:

Answer:

Explanation:

I find the first one funny. The correct tense is didn't meet yesterday. If you use won't, you are talking about an event that will happen in the future.

The second one is correct.

Currently needs a present tense verb. Currently my favorite food is ice cream.

D is another one that is just wrong. It too is kind of funny. It should read The Candied yams will be delicious tomorrow. The implication is that they are not good today, and they weren't good yesterday.

Thanks for posting. It's an interesting question to answer.

Which of the following apply to the definition of Wide Area Networks? Check all of the boxes that apply.

cover large geographic areas

are only available in the US

link many networks together

known as WANs

known as LANs

Answers

Answer: Cover large geographic areas, link many networks together, known as WANs

Explanation:

Just took it got it right

Answer:

A,C,D

Explanation:

would a interactive book be considered a game?

Answers

[tex]\huge\bold\red{Answer:-}[/tex]

✮With its anthology of Interactive Fiction, Studio Oleomingus creates an interplay of text and built environments.

✮The readers/viewers are given the freedom to tailor the story according to their own sensibilities.

FOLLOW ME ♥️

Answer:

No i wouldn’t say so

Explanation:

X = 0
end = int(input("Pick a number: "))
for num in range(1, end, 2):
#missing line
print(x)
X 10.
This program should print the sum of all the ODD numbers between 1 and the user's number pick the "end" variable)
Write the missing line that will make that possible.
I think its print(1 + end) but If its wrong can I please have feedback cause I'm struggling with this 1.

Answers

The missing line would be x+= num

This means that every time a number is selected from the range it is added to the value of x.

What are the key ideas in dealing with a superior?


respect and ethics

respect and understanding

respect and timeliness

respect and communication

Answers

Respect is a key requirement for a healthy work environment. It promotes teamwork and increases productivity and efficiencies in the workplace. It lets employees know they are valued for their abilities, qualities and achievements, and that their role is important to their company's success.

Answer:

respect and ethics

Explanation:

Which stage best represents the developing of documents that provides the basis for acquiring the resources and for developing a requirements document?

Design
Implementation
Planning
Development

Answers

Answer:

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

Explanation:

The correct answer to this question is the planning stage. Because the planning stage represents the development of documents that provide the basis for acquiring the resources and for developing the requirement document. at this stage, you plan about what you are going to develop and how to develop it. At this stage, you come out mainly with two documents i.e. project proposal and requirement document.

Other options are not correct because:

In the project management, after planning, you will start designing the product, and after designing you start developing the product, and at the implementation stage, you implement or deploy the product to the customer or to the client. The requirement document that is developed at the planning stage can be used in the later stages of the project.

brainliest Will be given​

Answers

A (I am pretty sure)

In Python, arrays are usually reserved for
sorting operations.
indexing operations.
searching operations.
numerical operations.

Answers

Answer:

D on Edge, or Numerical Operations

Explanation:

In Python, arrays are usually reserved for numerical operations, such as sorting numbers from lowest to highest.

Answer:

D

Explanation:

Which symbol is at the beginning and end of a multiline comment block? &&& """ %%% ###

Answers

Answer:

#

Explanation:

I have notes on it we learned it in 8th

###

the other guy was correct.

Read the following scenario, and then answer the question below.
Olivia walks to a coworker's empty desk to borrow a pen and sees that the coworker has an open e-mail
confirming her last paycheck deposit. Olivia reads the e-mail. She is upset to learn that the coworker makes
more than she does. She tells her best friend her coworker's salary in an e-mail.
Which principles of Internet etiquette is Olivia breaking?
not sending repeated, unwanted e-mails
O avoid engaging in angry online chats
O respecting others by not shouting
O protecting the privacy of others

Answers

Answer: Protecting the privacy of others

Explanation:

Answer:

D-protecting the privacy of others.

Explanation:

Which media choices give you the most benefits? What are those benefits?

Answers

Answer:

Electronic media

Explanation:

1 make you popular

When should a developer begin thinking about scalability? 1 during the design phase 2during testing 3when traffic increases by 25 percent 4when the system is available to users

Answers

Answer:

in my opinion 4

Explanation:

when the system is available to users

(sorry and thanks)

I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
All slides in a presentation must use the same transition.

True
False

Answers

Answer:

true

Explanation:

The answer is true good luck

Please answer quick:))))

Answers

I think B and the second one C

Easy 10 point but can u plz help me

Answers

Answer:ITS TRUe

Explanation:there ya go :^

PLEASE HELP!! WILL MARK BRAINLIEST!!~~~Brody is concerned that he is going to exceed the quota set for his mailbox. Where should he go to access the Mailbox Cleanup tools?

Backstage view
Inbox
Deleted Items Folder
Outlook Web App

Answers

Answer:

d

Explanation:

Outlook Web App will provide access to the Mailbox Cleanup tools. The correct answer is D.

What is Outlook?

On the Menus tab, you'll notice a Tools menu next to the Actions menu on the toolbar. Click Tools to open the Tools drop-down menu, which includes options such as Mailing All Folders, Cancel All, Com Add-Ins, Disable Items, Perspective Options, and so on.

These include any emails you send back and forth using replies.

The process of cleaning up is shown below.

Choose an email conversation that you want to clean up.Choose Delete > Clean Up Conversation by clicking the arrow next to it. You can also purge entire Folders.If prompted, choose Clean Up to confirm.


Access
to the Mailbox Cleanup tools will be Outlook Web App. Then the correct option is D.

More about the Outlook link is given below.

https://brainly.com/question/17457799

#SPJ6

How would you describe the relationship between blocks of code and commands?
HELP​

Answers

Answer:

Code and Commands have similar programs coding has only one thing to do or done but commands can be told anytime by an input device.

Explanation:

hope this helps.

What will be the output of the following program? Assume the user responds with a 3.

answer = input ("How many shirts would you like? ")
priceShirt = 4.00
intNumberShirt = float(answer)
moneyDue = intNumberShirt * priceShirt
print ("You owe $" + str(moneyDue))

You owe $ 12.0

An error occurs.

You owe $12.0

You owe $ moneyDue

Answers

If the user responds with 3, the output will be:

You owe $12.0

Answer:

You owe $12.0

Explanation:

Josh needs to write a research report for his Civics class. Which file type will allow him to save his file?
A: DOC
B: GIF
C: JPG
D: ZIP

Answers

answer is Doc type format

Answer:

Josh would have to use a DOC as that will allow him to save his file.

Explanation:

DOC is a document file format, basically, a typed file on your computer. It's the best place for anyone to edit their document.

The most common cause of foodborne illness is

Answers

Answer:

Food posioning

Explanation:

According to the Food and Drugs Administration (FDA), the most common cause of foodborne illness is food poisoning.

What is a foodborne illness?

A foodborne illness can be defined as a type of disease that is generally caused due to the consumption of a contaminated food or any food material that has been poisoned.

According to the Food and Drugs Administration (FDA), the most common cause of foodborne illness around the world is food poisoning such as when bacteria and other pathogens grow on a food.

Read more on food poisoning here: https://brainly.com/question/27128518

#SPJ2

What do PNG files offer that JPG files do not?
O Animation
O Layers
O Metadata
O Transparency

Answers

Answer:

Transparency

Explanation:

You can not make a JPEG image transparent. Formats such as PNG or GIF, however do allow transparency.

Hope this helps!

The feature that PNG files offer that JPG files do not is Transparency. Thus the correct option is D.

What are PNG files?

 PNG is an acronym for Portable Graphics Format. It is the most used unstructured graphic picture format on the internet. There are no copyright restrictions on the free PNG file format.

Joint Photographics is abbreviated as JPG which is the same thing as JPEG in terms of performance. With the help of this picture file format, photographs can now be shared via email and are more suited for use in web design by having smaller file sizes.

The main benefit of PNG is that there is no quality degradation when it is opened and saved multiple times because of its lossless compression. Increased, complex images can also be handled successfully by PNG.

Therefore, option D is appropriate.

Learn more about PNG files, here:

https://brainly.com/question/2315962

#SPJ6

SOMEONE PLEASE HELP ME

Answers

Part 1:

x = first variable

y = second variable

print the variables to the console.

Part 2:

// Replace this with your name, today's date, and a short description.

def main():

   x = 'My favorite book is python for dummies.'

   y = 'I get to learn a lot about python.'

   print(x)

   print(y)

if __name__ == "__main__":

   main()

Part 3:

The purpose of my program was to express separate string variables and print them separately to the console. Also, I was able to demonstrate how functions work.

My program could be useful for storing values in variables for later. Although quite small, my program expresses how easy functions are to use.

I had trouble setting up my functions properly. To fix this problem, I looked back in our notes.

Next time, I will review our notes before starting the assessment. I will also remember how to properly use functions.  

How is computer programming useful in real life? Help me

Answers

It can help you with technology and can help you become a computer programmer if you like technology hope this works I’m sorry if it doesn’t

Mihaela I. Croitoru – Utilizarea calculatorului personal Microsoft Word dau coroana

Answers

Answer:

what is this?

the first generation of computers used vaccum tubes .Why were they replaced by the transistors​

Answers

The transistor was smaller and used less power also it was faster and more efficient

What's the best definition of financial literacy? A. The efficient and effective management of money b. The ability to find, evaluate, utilize, share, and create financial content c. The business or services conducted by a tank d. The ability to use knowledge and skills to manage financial resources effectively

Answers

Answer:

D)The ability to use knowledge and skills to manage financial resources effectively.

Explanation:

financial literacy can be explained as the utilization of financial skills in an efficient way and having the deep understanding of it in tackling financial problems. The financial skills could be skills such as Budgeting, understanding of financial management as well as investing.

In cases whereby one lacks financial skills then it can be regarded as financial illiteracy.It should be noted that the best definition of financial literacy is The ability to use knowledge and skills to manage financial resources

A company gives you a document to review. This document lays out the strengths and weaknesses of a proposed business venture. It also evaluates the venture's potential for success. Which option best describes this document you are reviewing?

Feasibility analysis
Project prototype
System model
Requirements document

Answers

Answer:

The answer to this question is given below in the explanation section. However, the correct option for this question is Feasibility analysis.

Explanation:

The correct option for this question is feasibility analysis. Because in a feasibility analysis document, you can specify the weakness, strength, strategy, and plan for a specific business venture. This document also represents the validation and evaluation of the business venture that you are going to start or proposed. Basically, a feasibility document represents a feasibility study of the practicality of a proposed project or system.

Other options are not correct because:

A project prototype is a tool that can be used to get early feedback from customers/clients on what you are going to be developing. The system model represents the model or abstraction of the system while the requirement document is used to communicate the aims of a project/program/product or service in a clear, concise way to ensure all stakeholders are on the same page.

Other Questions
Where does Washingtons loyalty reside during the onset of tho conflict A line extends from point T to point R. Point S is between points T and R. The space between T and S is labeled 3 x minus 4. The space between T and R is labeled 4 x + 1.Which expression represents the measure of segment RS?7x 37x + 5x + 5x 3 Which member of Congress was convicted under the Sedition Act for accusing President Adams of a continued grasp for power? Nell and Kirby are in the process of negotiating their divorce agreement. What should be the tax consequences to Nell and Kirby if the following, considered individually, became part of the agreement? a. In consideration for her one-half interest in their personal residence, Kirby will transfer to Nell stock with a value of $200,000 and $50,000 of cash. Kirby's cost of the stock was $150,000, and the value of the personal residence is $500,000. They purchased the residence three years ago for $300,000. Nell's basis for the stock is _______$ X Kirby's basis in the house is ______$ X b. Nell will receive $1,000 per month for 120 months. If she dies before receiving all 120 payments, the remaining payments will be made to her estate. The payments (qualify, do not qualify) as alimony and are (included in, excluded from) Nell's gross income as they are received. c. Nell is to have custody of their 12-year-old son, Bobby. She is to receive $1,200 per month until Bobby (1) dies or (2) attains age 21 (whichever occurs first). After either of these events occurs, Nell will receive only $300 per month for the remainder of her life. $ X per month is alimony that is (included in, excluded from) Nell's gross income, and the remaining $ X per month is considered(child support, property settlement) and is (nontaxable, taxable) to Nell. Where does a carnivore directly get its energy from? Read this excerpt from Through the Looking-Glass by Lewis Carroll.She was rambling on in this way when she reached the wood: it looked very cool and shady. Well, at any rate it's a great comfort, she said as she stepped under the trees, after being so hot, to get into theinto WHAT? she went on, rather surprised at not being able to think of the word. I mean to get under theunder theunder THIS, you know! putting her hand on the trunk of the tree. What DOES it call itself, I wonder? I do believe it's got no namewhy, to be sure it hasn't!She stood silent for a minute, thinking: then she suddenly began again. Then it really HAS happened, after all! And now, who am I? I WILL remember, if I can! I'm determined to do it! But being determined didn't help much, and all she could say, after a great deal of puzzling, was, L, I KNOW it begins with L!Which question might a reader ask to gain a better understanding of this excerpt?Why does Alice choose to step through the looking glass?Why does Alice forget the name of the woods and her own name?Why does Alice want to play chess with all the others in the garden?Why does Alice talk to the gnat about the looking-glass insects? Jacob is going on a road trip across the country . He covers 10 miles in 15 minutes . He spends 10 minutes buying gas and some snacks at a gas station. He then continues on his road trip describe the distance traveled between 10 minutes and 15 minutes what do you feel expressed the colonial spirit and attitude about the american revolution Geometry question..can anyone help? Which table represents a linear function? x---y0---11---22---43---8x---y0---01---12---33---6x---y0---01---12---03---1x---y0---11---32---53---7 Select theSuppose Phil reads a book that contains 16 conspiracy theories. When he researches thetheories, he finds that 75% of them are false. How many of the theories are true? Use the table to help determine the answer to the question below. If one cake needs 413 cup(s) of flour, how much flour will 3 cakes need? Mental math what is 90 x 20 which characteristic of gregorian chant Which of the following is a good definition of matter?O A. Anything that is made up of light and gravityO B. Anything that has mass and takes up spaceO C. Anything that produces heat and massO D. Anything that has energy and creates heat pleassseee help will give good rating and brain :) How could an outbreak of smallpox affect the population? Hows ready to hear a poem What is layer E pointing to Evaluate 8 - m/n + p when m = 8, n = 2, p = 7.Correct answer will be marked brainliest!!