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
Give reasons why you care for your sense organs​
Cerrena [4.2K]

HI!the resaon why should you care for you sense organs is that they help us to contact with our surroundings.

8 0
2 years ago
Read 2 more answers
Favorite video games list atleast 5<br><br> favorite to least
Aneli [31]

Answer:

Rob lox, Sub nautica, Phasmo phobia, Albion Online,  fnf.

Explanation:

6 0
3 years ago
How to turn off 2-step verification without signing in.
Alenkasestr [34]

Answer:

You cannot do this; you need to sign into the account to gain access to any account security settings

4 0
3 years ago
In a cellular network, where does each wireless base station connect to?
Vanyuwa [196]

Answer: They connect to a mobile switching center.

Explanation:

The mobile switching center links all the wireless base stations to other earth stations with the help of repeaters. This process allows them to transmit and receive data and hence communicate through the medium of air.

Therefore, in a cellular network each wireless base station connect to a mobile switching center.

5 0
3 years ago
Assume that an int variable is Quadrilateral has been declared, and that another int variable, number Of Sides has been declared
kondor19780726 [428]

Answer:

The answer to this question can be given as:

Statement:

isQuadrilateral = (numberOfSides == 4) ? 1 : 0;

//check condition using ternary operator.

Explanation:

we know that both(Quadrilateral, numberOfSides) is already declared in the program. So the statement for check condition is (isQuadrilateral = (numberOfSides == 4) ? 1 : 0;). To check this condition we use the ternary operator. In this operator, we also check another condition. The syntax of ternary operator (condition ? value_if_true : value_if_false).In this statement on the lift side we use the variable for check condition and right side we check condition if the value is true it prints 1 else it will print 0.

4 0
3 years ago
Other questions:
  • The term _____ best describes the level of technology skills needed in today’s business world.A: computer knowledgeB: computer f
    10·1 answer
  • In the ascii coding scheme, each byte represents a single ____________________, which can be a number, letter, blank space, punc
    9·1 answer
  • Given a double variable named areaofsquare write the necessary code to read in a value , the area of some square, into areaofsqu
    9·1 answer
  • Grenstall Inc., a software development firm, has adopted a new job evaluation system in which managers are asked to objectively
    12·1 answer
  • In ____, two or more disk drives become one large volume, so the computer views the disks as a single disk.
    13·1 answer
  • You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
    13·1 answer
  • Note oj cyber security​
    6·1 answer
  • Which information can you apply to every page of your document with the page layout options?
    9·1 answer
  • The format that you will use on your works cited page when the entry is longer than one line is__________.
    5·1 answer
  • Tick the best alternatives 1. Which one of the following is input device? a) Speaker b) Printer c. Monitor d. Mouse​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!