Question: Write code that takes two strings from the user, replaces all instances of the second string with box in the first, and return this in
Write code that takes two strings from the user, replaces all instances of the second string with box in the first, and return this in BACKWARDS order. For example, yppahmondayyppahday and happy yields the result yadboxyadnombox. We will guarantee the second string will be less than four characters long. You may not use the built-in replace function. Please use PYTHON 2.7, and your answer MUST be a WHILE loop and NOT a "for" loop!
Here is the link to the python visualizer for the code I have so far, feel free to modify as needed.
https://goo.gl/VjEhcD
Here are the test cases that it MUST pass!
replaceAll bird c drib replaceAll bird i drboxb replaceAll bird ri dboxb replaceAll birdird ri dboxboxb replaceAll birdeeeirde dri eboxeeeboxb replaceAll birdeeeirede dri ederieeeboxb
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
