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
pantera1 [17]
3 years ago
6

Write a function called word_count. word_count takes as #input a string called my_string, and returns as output the #number of w

ords in the string. For the purposes of this #problem, you can assume that every space indicates a new #word; so, the number of words should be one more than the #number of spaces. You may also assume that any strings are #not empty, so there should always be at least one word if #my_string is a string. #
Computers and Technology
1 answer:
Lisa [10]3 years ago
3 0

Answer:

def word_count(string):

   tokens = string.split()

   n_tokens = len(tokens)

   return n_tokens     # <-- here is the difference

print(word_count("Hello World!"))

print(word_count("The quick brown fox jumped over the lazy dog."))

Explanation:

You might be interested in
HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HEL
AURORKA [14]

Answer:

I should be C! :D

5 0
3 years ago
Read 2 more answers
The _____ constraint assigns a value to an attribute when a new row is added to a table
bixtya [17]

The default constraint gives a value to an attribute when a new row is added to a table.

<h3>Is default a kind of constraint?</h3>

This is known to be a type of constraint that often apply a value to a column if an INSERT statement does not really give the value for the column.

Therefore, one can say that the default constraint gives a value to an attribute when a new row is added to a table.

Learn more about default constraint from

brainly.com/question/19130806

#SPJ12

5 0
2 years ago
You need to prevent the use of tftp through your firewall. which port would you block?
xz_007 [3.2K]
Hello <span>Huber5598 </span>


Question: <span>You need to prevent the use of tftp through your firewall. which port would you block?
</span><span>
Answer: You should block UDP port 69 to block TFTP


I Hope This Helps You :-)
-Chris</span>
4 0
3 years ago
Identify tags and attributes in HTML 5
Vaselesa [24]

Answer:

Tags can be identified as they are written as <tagname> Something </tagname>

<tagname> this tag is called start tag.

</tagname> this tag is called as end tag.

for ex:<p> This is a paragraph </p>

There are some elements with no end tag.for ex:- <br> tag.

Attributes are used to provide additional information to an HTML element.

Every element can have attributes.

for Ex:- <h1 style="background-color:red";>MY WEBSITE </h1>

So the background of h1 will become red.

7 0
3 years ago
This unit is used to print the picture on a paper
NeTakaya

Answer:a printer

Explanation:

It prints things

7 0
3 years ago
Other questions:
  • to the nearest millimeter a cell phone is 123 long and 54 mm wide what is the ratio of width to length
    12·1 answer
  • "To take advantage of these developments in the digital world, new approaches, concepts,instruments, and methods are needed, whi
    8·1 answer
  • (Best Buy Part A) At a Best Buy store, the forecast for the annual demand of a Motorola cell phone is 15600. Demand forecasts ar
    12·1 answer
  • Consider a system that uses a 32-bit unique salt where users have a 4-digit number as a password (e.g. 6813). Eve wants to crack
    8·2 answers
  • What does it mean to clear a setting in a dialog box?
    14·1 answer
  • What do the buttons on the paste options menu do
    11·1 answer
  • A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
    14·1 answer
  • Users can customize their Windows device by going to the Control Panel under __________.
    15·2 answers
  • Which of the following statements is TRUE? A. A name error occurs if the variable is referenced before it is declared. B. A name
    12·1 answer
  • ANSWER QUICKLY!!! <br><br> Which aspect of planning is a preventive action?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!