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
kogti [31]
4 years ago
10

Write a function named word_count that accepts a string as its parameter and returns the number of words in the string. A word i

s a sequence of one or more non-space characters (any character other than ' ').
Computers and Technology
1 answer:
Hatshy [7]4 years ago
4 0

Answer:

def word_count(words):

   return len(words.split(" "))

print(word_count("This is Python."))

Explanation:

*The code is in Python.

Create a function called word_count that takes one parameter, words

Split the words using split function, use " " for the delimiter, and return the length of this using len function.

Note that split function will give you a list of strings that are written with a space in the words. The len function will just give you the length of this list.

Call the word_count function with a string parameter and print the result.

You might be interested in
Why we use cluster computing and hadoop framework for big data sysetm​
Ber [7]

Answer:

Explanation:

Hadoop clusters can boost the processing speed of many big data analytics jobs, given their ability to break down large computational tasks into smaller tasks that can be run in a parallel, distributed fashion.

5 0
2 years ago
What is the output of the following?
lys-0071 [83]

Answer: a. the number is: 14

Explanation:

i mean just try to write in 7 instead of x in the second line

then it would say the number is: ....

what is 7 times 2?

14

so the answer is a

5 0
3 years ago
A good website design combines which of the following elements? (select all that apply) powerful web server hardware components
Anarel [89]

Sounds like it'd be all of the above.


7 0
3 years ago
Read 2 more answers
When preparing images to be used for different mediums print web and video in photoshop different file formats are required , se
Anika [276]
The answers are :
JPEG - Compresses well without losing quality, it should be used for the web
TIFF - Can be saved in an uncompressed file format with a high resolution, it is a common file format used for professional print services
BMP - Can be saved in a compressed or uncompressed file format, It is a common file format used for either web or print
<span>FLV or SWF - Used to publish a rendered video for use on the web</span>
5 0
3 years ago
To which type of server will you transfer resources so that your colleagues cam aslo use them ?
Alborosie
Google drive or Dropbox. Services like that.
7 0
4 years ago
Other questions:
  • We all interact with various information systems every day: at the grocery store, at work, at school, even in our cars (at least
    11·1 answer
  • .In Linux what command sequence do we enter to stop a program?
    11·1 answer
  • What is "social
    13·2 answers
  • G Suite for Education offers which benefits to educators? (Select all that apply.) Select All Correct Responses Android apps ava
    10·1 answer
  • Why might a business professional choose to use a desktop computer rather than a tablet or laptop at work?
    7·2 answers
  • escribe and explain at least three improvements you think came about with the introduction of intrusion prevention technology. J
    10·1 answer
  • What are programs that are installed without the user knowing
    7·1 answer
  • Briefly explain the conceptual of effective computer based instruction for adults outlining the three units output process and i
    14·1 answer
  • Which of the following is true about stateless applications?
    9·1 answer
  • Who is better, Tom, Ben, Hank, Angela, or Ginger
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!