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
Whats a computer scientist.
Kazeer [188]

Answer:

computer scientist is a person who has acquired the knowledge of computer science, the study of the theoretical foundations of information and computation and their application.

4 0
3 years ago
Read 2 more answers
New Top Level Domains (TLDs) are coordinated by:_______.
Marizza181 [45]
ICANN is the answer
7 0
3 years ago
True or false: Quality score is an algorithm that scores each of your search ads on spelling and grammar.
andrew11 [14]
True or false: Quality score is an algorithm that scores each of your search ads on spelling and grammar.

Answer: False

I think sorry
4 0
2 years ago
....................................................................................................
r-ruslan [8.4K]

Answer:

......................

..............

......

....

...

..

.

6 0
2 years ago
What port does rdp use by default and from what range of numbers should you select a private port number?
VARVARA [1.3K]
The default RDP port is 3389 but can be configured in the range of <span>49152-65538</span>
5 0
3 years ago
Other questions:
  • How can you best protect yourself when using social media
    5·2 answers
  • When planning your educational and career path, it makes sense to consider where you want to work and what type of work you want
    14·1 answer
  • ____ is the name of a particularly nasty automated program that attacks a network by exploiting Internet Protocol (IP) broadcast
    15·1 answer
  • The entirety of a packet at one layer becoming the payload section at another layer is known as
    8·2 answers
  • The ______________ shows that you have fully researched the topic and gives you a chance to prove your claim.
    8·1 answer
  • Choose the correct term to complete the sentence.
    12·1 answer
  • Which list shows a correct order of mathematical operations that would be used by a spreadsheet formula?
    5·2 answers
  • In the following code: function drawCircle(radius, x, y, color) { var circle = new Circle(radius); circle.setPosition(x, y); cir
    7·1 answer
  • 我对汉语的兴趣 làm đoạn văn theo đề trên​
    14·1 answer
  • The sun can be an excellent source of natural light.<br> True.<br> False.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!