The Currency Converter
The goal of this assignment is to use functions. Try to contain as much of your code as possible inside of functions that are well named and can be reused. At a minimum your code must use two functions.
You are to create a program that can convert money from one system to another. (Going back & forth form USD – EURO or EURO – USD)
At the start of your program, ask the user how much money they have. Next ask them what currency they have and finally ask them what they want to convert it into. Convert the currency to the requested output and print a nice alert message with the value in the other currency.
Requirements
Use the following currencies and conversion rates:
1 USD = 0.91 Euro
1 USD = 124.17 JP Yen
1 USD = 0.65 British Pound
1 USD = 3.51 Brazilian Real
You can use math to figure out what all of these are equal to relative to one another.
Use the following as allowed input for the currency systems:
‘USD’
‘EUR’
‘GBP’
‘JPY’
‘BRL’
Program expectations
Your code must use a minimum of two functions.
One function should calculate the conversion.
One function should print the alert message with the converted currency and the currency name.
The conversion function(s) should accept input parameters and return a value.
The print function should also take input parameters.
The final message should display the converted currency rounded to two decimal places.
Hint – It probably makes sense to use two conversion functions. One function to convert from any currency into USD and another to convert from USD into anything other currency.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more