Search for question
Question

Question 22 20 pts Write a function that takes as an argument a string of uppercase letters and returns a converted version of the string where every letter that is equal to either "Y" or "X", if present, is replaced by the next letter in the string. If either "Y" or "X" appears in the last position they should remain unchanged. Examples: • If 'YC' is the original string, the function should return 'CC'. • If 'AXB' is the original string, the function should return 'ABB'. • If 'YTXD' is the original string, the function should return 'TTDD'. • If 'AYXERXWDYT' is the original string, the function should return 'AXEERWWDTT'. Answer submission: Work on your code answer in a Jupyter Notebook and copy-paste your code in the text-box area below.

Fig: 1