Question: Write a function exclaim ( s ) that takes an arbitrary string s as input and uses recursion to form and return the string formed

Write a function exclaim(s) that takes an arbitrary string s as input and uses recursion to form and return
the string formed by adding an exclamation point (i.e., the character '!') after each character in the string
s. Here are four examples:result: 'h!e!l!l!!o!'result: 'w!o!w!'result: 'o!'result: ''
This function is somewhat similar to the remove_spaces function from Lab 3, because it needs to recursively
create a new string from an existing string. However, your function will be simpler, because it won't need to
decide what to do after the recursive call returns.
Don't forget to test your functions using the approaches mentioned at the start of Problem 3.
 Write a function exclaim(s) that takes an arbitrary string s as

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!