Question: In Python Write a program that prompts the user to enter the currency exchange rate between U.S. dollars and Canadian dollars. Prompt the user to
Write a program that prompts the user to enter the currency exchange rate between U.S. dollars and Canadian dollars. Prompt the user to enter 0 to convert from U.S. dollars to Canadian dollars and 1 for vice versa. Prompt the user to enter the amount in U.S. dollars or Canadian dollars to convert it to Canadian dollars or U.S. dollars, respectively. Round amount of money to 2 decimal places using format method. Here are sample nuns: Enter the exchange rate from U,S. dellats ev Cannctian dollars: 1.32 Enter 0 to couvert U.S. dollars fo Camadiain dollats and I vice versa: 0 Eniter the U.S. dollar amount: 10.75 10.75 U.S dollars is 14.19 Canadian dollars Euter the exchange rate from U.S. dollars to Canadial dotaus 1.32 Enter 0 to convert U.S, dollars to Canadian dollars and 1 ficecversa: 1 Enter the Canadian dollars amount: 14.19 14.19 Canadian dollars is 10.75 U.S. dollars
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
