Question: python Stock Names Function Name: stockNames() Parameters: first stock name (str), second stock name (str) Returns: string (str) Description: Given two stock names, interweave the
python
Stock Names Function Name: stockNames() Parameters: first stock name (str), second stock name (str) Returns: string (str) Description: Given two stock names, interweave the two stock names by concatentating the first letter of the first name with each letter of the second name, until you reach the end of the second name. Then, repeat this process with the second letter of the first name. Contin- ue until you have reached the end of the first name. Return the resulting interweaved name. >>> stockNames ("abc", "DEF") 'aDaEaFbDbEbFcDcEcF' >>> stockNames ("tik", "tok") 'tttotkitioikktkokk
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
