1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Taya2010 [7]
3 years ago
13

Count the number of words in the string. A word is one or more non-blank characters separated by one or more blanks. My suggesti

on is to use a flag (a boolean variable) to indicate whether or not you are in a word. Then you know you have found a word when the flag indicates that you are in a word and the next character is a blank. Think about how you will know when you have found the end of a word, and what you should do with your flag at that point.
Computers and Technology
1 answer:
NikAS [45]3 years ago
7 0

Answer:

myString = input("Please enter a string")

wordList = myString.split()

numofWords = len(wordList)

print('The number of words in {} is {}'.format(myString, numofWords))

Explanation:

Since the suggestion to use a boolean variable flag is not compulsory, I have implemented it in another way.

Using python programming language, the input function is used to prompt the user to enter a string which is saved in a variable myString.

The string entered is converted into a list of all the words by spliting at the blank spaces and saved in the variable wordList

Next we count the number of words by obtaining the len of the list and output to the user

You might be interested in
You are the administrator for a small network. You have approximately 50 users who are served by a single Windows server. You ar
Paladinen [302]

Answer:

Rename the existing account, and change the name fields to match the new employee.

Explanation:

As you appoint new employer that need all the access to everything that the previous user had, including the documents files held in the Home Folder.

So, As an administrative of the network, you should Rename the existing account, and change the name fields to match the new employee.

4 0
3 years ago
Based on the following quote from Leonardo Da Vinci, what would be his definition of a fine artist? “Principles for the Developm
zvonat [6]

Answer:

A fine artist is one who sees the things other don't see and make connections other don't make.

7 0
3 years ago
Read 2 more answers
Why do we buy new asset​
Shalnov [3]

Your question is too vauge, what do you mean exactly in what terms because you aimed this to to computer and technology, In business terms asset is something that brings in money or brings a positive impact. A form of asset can be stocks, crypto, NFTs, real estate... If you own one of these you own an asset, its as simple as that.

3 0
3 years ago
A 9-year old male castrated Westie presents on emergency after being rescued from a house fire. On presentation, the dog has a r
SVEN [57.7K]

Answer:

The correct option to the following question is Carbon monoxide

Explanation:

Most common symptom of Carbon Monoxide poisoning are dizziness, headache, weakness, vomiting, upset stomach, confusion, and chest pain. The Carbon monoxide or CO symptom is often that described as “flu-like.” If the breaths in a lot of the Carbon monoxide or CO then it can make pass out any person or it kills you.

5 0
3 years ago
To deny a host from sending HTTP traffic destined to a specific server you will need to apply a __________ Access Control List.
DedPeter [7]

I would a Standard Access control List

There are two common access lists: The standard and extended access list.  With the standard access list, it creates filters only on source addresses and is commonly used for server-based filtering. They are not as powerful as extended access lists. Standard Access lists are typically used for restricting access to a router through HTTP and HTTPS.  


6 0
3 years ago
Read 2 more answers
Other questions:
  • Given the plaintext {0F0E0D0C0B0A09080706050403020100} and the key {02020202020202020202020202020202}: a. Show the original cont
    11·1 answer
  • Which of the following would you click to access Help and Support?
    6·2 answers
  • A number used to encrypt data is called a(n ________. signature key cookie escrow
    10·1 answer
  • Jesse wants to create a website with her company name as the address. What should she do next?
    9·1 answer
  • The various protocols in use on the internet are said to operate in layers in which the protocol(s) at each layer solve one prob
    5·2 answers
  • Which of the following actions would not reduce software piracy? reducing the cost of software. offering downloads of software.
    12·2 answers
  • How can I get more views on my you tube channel "Braeden Eischen" without paying anything
    5·1 answer
  • ) Write a program to calculate the time to run 5 miles, 10 miles, half marathon, and full marathon if you can run at a constant
    12·1 answer
  • Describe all the steps a router goes through while deciding where to send the a packet. Explain why a router would choose one ro
    7·1 answer
  • What's wrong with this python code i don't know what's wrong with both of them
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!