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
Communications technology and the Internet can be used to reduce the time and costs involved in disseminating financial statemen
mash [69]

Answer: D)XBRL(eXtensible Business Reporting Language)

Explanation: XBRL(eXtensible Business Reporting Language) is the type of XML(eXtensible Markup Language) that is used for the improvement in the transparency between the recipient and the business organization regarding the accessibility of the financial information.

The financial data is formatted uniformally so that the user can get the knowledge about the finance through the online sources like internet.

Other options are incorrect because HTML and XML are the markup languages but not for the financial area and PDF file is the file that stores data.Thus correct option is option(D).

4 0
3 years ago
Click cell C6 in the Data worksheet and insert a column. Type Series Name in cell C6. Click cell C7 in the Data worksheet and in
Rudiy27

Answer:

right click cell C6 then insert entire column.

Type "Series Name"

Insert function to C7 = VLOOKUP (B7,$A$2:$B$4,2,FALSE)

Copy through C22

Select the range then select format and column width to change the width to 18.

7 0
3 years ago
Describe your WGU program, including two specific requirements that this degree has for completion.
Pavlova-9 [17]

Answer:

WGU program, including two specific requirements that this degree has for completion is explained below in details.

Explanation:

WGU is an online academy with profession joined bachelor's and master's degrees in—IT, education, marketing, and healthcare—intended to support working professionals fit an online academy learning into their hard-working lives.

As a scholars, graduate pupils must register in at least eight competency units every term, and undergraduate pupils must register in at least twelve competency units respectively term.

3 0
2 years ago
How do you tack pictures for this app
olga2289 [7]
There is a paper clip on the bottom left on your screen. When answering a question click it to apply a picture. Have a wonderful day.

(Take*)
3 0
3 years ago
Analyze the following code. Which of the following statements is correct?
matrenka [14]

Answer:

that is complex wow

Explanation:

8 0
3 years ago
Other questions:
  • A ____ is a prewritten formula that is built into excel.
    6·1 answer
  • Which option should you select to ignore all tracked changes in a document
    6·1 answer
  • Create a structure named planet This structure will contain distance from Earth as an integer Atmosphere, language, people and p
    8·1 answer
  • What is the name of the program file that you can enter in the Windows search or Run box to execute Event Viewer? What process i
    12·1 answer
  • A(n) ________ CPU has two processing paths, allowing it to process more than one instruction at a time.
    9·2 answers
  • Why does my inbox keep getting notifications and then disappearing?
    15·2 answers
  • What is the difference between private inheritance and composition?
    11·1 answer
  • Which of the following is constantly changing and advancing?
    11·1 answer
  • If a student passes off an author’s work as his or her own, the student has
    6·1 answer
  • A statement that starts with a # symbol is called
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!