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
irina1246 [14]
3 years ago
9

Write a function def countWords(stri ng) that returns a count of all words in the string string. Words are separated by spac For

example, countWords ("Mary had a little lamb") should return 5.

Computers and Technology
1 answer:
pashok25 [27]3 years ago
3 0

Answer:

def w_count(s):

   return(len(s.split()))

st=input('Enter a string:')    

print("Number of words in given string=",w_count(st))

Explanation:

You might be interested in
It is not possible to use keywords to search for themes
ivolga24 [154]
Yes it is you just need to know what you are doing

6 0
3 years ago
What is the Matlab command to create a vector of the even whole numbers between 29 and 73?
Nana76 [90]

Answer:

x = 29:73;

x_even = x(2:2:end);

Explanation:

In order to create a vector in Matlab you can use colon notation:

x = j:k

where <em>j</em> is 29 and <em>k</em> is 73 in your case:

x = 29:73

Then you can extract the even numbers by extracting the numbers with even index (2,4,6,etc.) of your vector:

x_even = x(2:2:end);

In the line of code above, we define <em>x_even</em> as all the elements of x with even index from index 2 till the end index of your vector, and an increment of 2 in the index: 2,4,6,etc.

If you want the odd numbers, just use the odd indices of your vector:

x_odd = x(1:2:end);

where <em>x_odd</em> contains all the elements of <em>x</em> with odd index from index 1 till the end index, and an increment of 2: 1,3,5,etc.

6 0
3 years ago
Self-disclosure is most likely to occur _____________.a.
Feliz [49]

The answer is..

C.  During one-on-one conversations

4 0
3 years ago
Read 2 more answers
What is the answer to this question?
Helga [31]

Answer:

LoadFactorLimit >=1

Explanation:

The maximum Load factor limit allowed is equal to 1. And it cannot be greater than 1. And as the load factor limit is reached, the HashSet size is increased. And hence, the correct condition statement for this question is as mentioned above.

Remember the Load factor = number of keys stored in a HashSet divided by its capacity. And its maximum value cannot be more than 1.

7 0
3 years ago
What are ways to enter a formula in Excel? Check all that apply. Click on the Function Library group and select a function from
zhenek [66]

Answer:

A. Click on the Function Library group and select a function from the drop-down menu.

B. Click on the Function Library group and Insert Function.

E. Type = into any cell.

F. Click on the formula bar above the cells.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
    8·1 answer
  • When you develop an application using a 3-layer architecture, the layer that provides the user interface is called the _____ lay
    13·1 answer
  • Look at the code in the example below, and then answer the question. In the example code, what does the title attribute create?
    12·2 answers
  • What would be advantageous for a laptop user to carry when the laptop gets a lot of use?
    14·1 answer
  • The SmoothWall open source firewall solution uses colors to differentiate networks. Which color indicates the private, trusted s
    9·1 answer
  • Agile methods comprise of 45 subprocesses which are organized into eight process groups.
    10·1 answer
  • Global address list characteristics
    11·1 answer
  • The contribution of Charles Babbage in the history of computer​
    6·1 answer
  • Do you think the current video game industry is likely to experience another “crash” (similar to the one in the 1980s) any time
    10·1 answer
  • How do you answer someone's question when they have asked?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!