Answer:
Step-by-step 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