Clarifications and Hints

Problem 6 - Find and Replace

Question 1: How many spaces separate the different symbols in the output?
We altered the "auto judge" ON THIS PROBLEM so it will ignore spaces on the lines of output. Therefore, it does not matter how many spaces (if any) after the colon or on either side of the "->". However, you must still have a blank line following each output case, including the last one and you must not have an extra blank line at the top in your output. Don't print tabs (\t) characters for any of your spaces in the output.
Question 2: We were asked to write a subroutine findAndReplace(). Python already has a string method called .replace() which does exactly what findAndReplace() is supposed to do. Can we use the .replace() method for this program?
No. The reason for doing this program is to learn how the built-in method might work. You will not receive full credit for the problem unless you have written your own subroutine findAndReplace() which does not use the replace() method. However, feel free to use other built-in methods such as .find() and/or .index() if you wish. --RS

Note: You can resubmit solutions that the Auto Judge has already said YES to and PC2 will not penalize your score, even if later submissions prove to be incorrect. This is good if you want to clean things up for full credit and the "style" points Ron mentioned. We recommend that if you do this, please send us email so that we look at the correct Python program that you want us to grade (we will probably assume it is the last YES submission from you, but we might overlook that). --JJ