20 Feb Markham Friday 19:30 Python Homework 20.02.14.
Question:
Do you still remember how to split a string and join a list? Roy was trying to record all the money he spend in the trip. However he wrote USD(U.S. Dollar) after each number instead of CAD(Canadian Dollar). Please write a program using the split and join knowledge to replace all the USD into CAD.
Sample Input:
2.5USD 3.4USD 12.84USD 30.3USD 107.6USD 2.4USD
Sample Output:
2.5CAD 3.4CAD 12.84CAD 30.3CAD 107.6CAD 2.4CAD
Sorry, the comment form is closed at this time.