Question: In python language: Create a currency exchange program that can convert between US dollars and the following currencies: Canadian Dollars, Mexican Pesos, Euros, Pounds, Swiss
In python language:

Create a currency exchange program that can convert between US dollars and the following currencies: Canadian Dollars, Mexican Pesos, Euros, Pounds, Swiss Francs, and Turkish Lira. The inputs to the program are the amount to exchange, and the currency to convert to. There is a of $5 or 5% of the amount being exchanged, whichever is higher. The fee should be subtracted from the amount to exchange before converting the currency. The minimum amount that can be exchanged is $10. You should use a dictionary named rates to hold the exchange rates. Use the following keys: . CDN: Canadian Dollars, exchange rate: 1 US Dollar = 1.31 Canadian Dollars PESO: Mexican Pesos, exchange rate: 1 US Dollar = 18.66 Mexican Pesos EURO: Euros, exchange rate: 1 US Dollar = 0.9 Euros LBS: Pounds, exchange rate: 1US Dollar = 0.77 Pounds FRANC: Swiss Francs, exchange rate: 1 US Dollar = 0.97 Swiss Francs LIRA: Turkish Lira, exchange rate: 1 US Dollar = 5.89 Turkish Lira Here are some sample runs: How much do you want to exchange? 9 The minimum amount you can exchange is $10. How much do you want to exchange? 10 What currency would you like to receive? MARK Sorry, the currency MARK is invalid. How much do you want to exchange? 10 What currency would you like to receive? EURO Here's your receipt: Original amount: $10.00 Transaction fee: $5.00 ($5.00 minimum) 4.50 Euros to customer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
