TORONTO KIDS COMPUTER CLUB | Markham Friday 19:30 Python Homework 20.02.14.
17090
post-template-default,single,single-post,postid-17090,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Markham Friday 19:30 Python Homework 20.02.14.

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

No Comments

Sorry, the comment form is closed at this time.