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
blagie [28]
3 years ago
13

g Write a function called chain_words(str) which takes in one parameter which is a string that holds multiple words separated by

spaces. Your function should return a string with the words chained together with an - (hyphen). You can first split the words at spaces and then join the words with - (hyphen). You can achieve this by using split and join methods respectively.
Computers and Technology
1 answer:
Oduvanchick [21]3 years ago
7 0

Answer:

Explanation:

The following is written in Python. The function takes in a string as a parameter. It then sperates the string at every space. Then it rejoins the list of strings with hyphens. Finally, returning the newly created string with hyphens.

def chain_words(str):

   string_split = str.split(" ")

   seperator = '-'

   hyphen_string = seperator.join(string_split)

   return hyphen_string

You might be interested in
What is a computer network?
Contact [7]

Answer:

A computer network is a group of two or more computers that are linked together. Networks are usually used to share resources, exchange files or communicate with other users. so A

Explanation:

7 0
2 years ago
Explain what the problems with the implementation of the function are, and show a way to fix them.// return true if two C string
Nataly [62]

Answer:

The code is not dereferencing the pointers. You have to place an asterisk in front of the pointer to read the value the pointer points to.

Explanation:

So "if (str1 != str2)" must be "if (*str1 != *str2)".

likewise:

   while (*str1 != 0 && *str2 != 0)

and

     result = (*str1 == *str2);

7 0
3 years ago
How do i get around a school related block
dimulka [17.4K]

Answer:

try putting "uk-" or "us-" depending on where you are, you could also go through your settings and try to allow everything.

3 0
3 years ago
Read 2 more answers
Write a program that accepts two integers from the user and perform one of the four arithmetic operations based on user’s choice
alex41 [277]

Answer:

do you still need the answer? or am i to lateeee

Explanation:

6 0
3 years ago
Explain the major innovation made from the establishment of abacus to present 5th computer generation.
ikadub [295]

Answer:

  1. Calculation using fingers
  2. Abacus (6th century BC)
  3. Sieve of Eratosthenes (3rd century BC)
  4. Napier bones
  5. slide rule
  6. Schikard's calculating clock with gears
  7. Pascaline
  8. Stepped reckoner by Leibniz
  9. Jacquard loom
  10. Mechanical computation machines (19th century)
  11. Analog computers (first half of 1900-1940)
  12. Digital computers (1940-1970)
  13. Computers with Microprocessors (1970 onwards)
  14. Smartphones (1992 onwards)

6 0
3 years ago
Other questions:
  • What do you like to play
    13·2 answers
  • What port does rdp use by default and from what range of numbers should you select a private port number?
    15·1 answer
  • How do you tack pictures for this app
    15·1 answer
  • Why is it important to use proper line types
    13·1 answer
  • Frank is a writer. He needs to work for long hours and type for long periods on the computer. What injury can Frank develop?
    15·2 answers
  • PreparedStatement ps = connection.prepareStatement("select firstName, mi, lastName from Student where lastName = ?"; ps.setStrin
    5·1 answer
  • A short cut to save a file is
    15·1 answer
  • PLZ help
    5·1 answer
  • READ CAREFULLY! There is a difference between moving and copying files.a. Create a directory named . For example, mine would be
    7·1 answer
  • What Is The First Computer Brought In Nepal ? <br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!