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
WILL MARK BRAIN LIST!
Maslowich
I think it’s a

if it isn’t a then it’s d
6 0
3 years ago
Read 2 more answers
Ask the user to enter a number. Display whether the number is odd or even. computer science answers
notsponge [240]

Answer:

Write a C program to check whether a number is even or odd using if else. How to check whether a number is even or odd using if else in C program. C Program to input a number from user and check whether the given number is even or odd. Logic to check even and odd number using if...else in C programming.

Explanation:

6 0
3 years ago
Read 2 more answers
When entering a formula or function into a cell, most spreadsheet programs require that you begin with some type of symbol, usua
olga_2 [115]
This is a false statement, if that's the question.
4 0
3 years ago
Describe the three-schema architecture. Why do we need mappings among schema levels? How do different schema definition language
VARVARA [1.3K]

Answer:

Three Scheme architecture contains internal level, conceptual level, and external level.

In the internal level physical structure of the database described. The internal Schema is also known as physical Schema, as it is used to define the data that stored in a block. Internal Schema describes a sophisticated level of data structure in detail.

The conceptual level design of the database has described, and it is known as a logical level. The conceptual level describes the whole structure of the database. It describes the relationships among the data. Implementation of data are hidden in a theoretical level

On the external level, databases contain schemas that represent a different view of the database. Each describes the database that the user interested in and hides the remaining database. The external database is also known as view schema.

Explanation:

The mappings between schema levels happen due to visualization and schema matching. DBMS has three schema level.

In the attached diagram

It shows the DBMS architecture.

Mapping is a way to transfer and respond to the request between the various database architecture.

Mapping takes more time to transfer data in small DBMS.

External / Conceptual mapping transforms the data from the outer level to the conceptual schema.

In Conceptual / Internal mapping, response transforms from conceptual to internal level.

Document Schema Definition Language (DSDL) is a framework in which multiple validations can be applied to achieve a complete validation result. In this way, schema definition language support this architecture.

8 0
3 years ago
T.J. wants to send a friend a file with a funny dancing cat. Which file format should T.J. use?
masha68 [24]

Answer:

If it is a Gif, then T.J. should, obviously, use the GIF format, but I think the answer you're looking for is MP3, since that is generally (at least for me) what videos are sent as!

Hope this helps(:

Explanation:

7 0
4 years ago
Read 2 more answers
Other questions:
  • I need to write a program that accepts eight int values representing student test scores from the user and then displays each of
    14·1 answer
  • Write a test program that creates two Rectangle objects—one with width 4 and height 40 and the other with width 3.5 and height 3
    5·1 answer
  • A technique for identifying and tracking assets using technologies such as RFID and smart cards is known as electronic tagging.
    6·1 answer
  • Which elements are visible when a user opens a new PowerPoint presentation?
    7·2 answers
  • Which of the following terms best describes the product development life cycle process?
    6·2 answers
  • ❤️❤️Please answer the six questions ✨BRAINIEST✨ For correct answer ❤️❤️
    7·1 answer
  • Describe the steps to change an existing macro in Microsoft office 2016
    6·1 answer
  • In how many positions are there nucleotide differences between your query sequence and the sequence of accession AY259214.1
    12·1 answer
  • Greenpeace used "Mister Splashy Pants" to:
    6·1 answer
  • Const x = 0;
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!