Question: Write a script that converts between US dollars and Euros. ( Use a rate of 1 US = 0 . 7 E for this exercise.
Write a script that converts between US dollars and Euros. Use a rate of US E for this exercise. The script should take one numerical required argument and one optional argument the currency, E or US If the user gives two arguments, perform the conversion. If the user gives only one argument, a number, assume the number is given in US dollars, warn the user, and perform the conversion. If the user gives no arguments, print a statement explaining how to run it Examples of test cases and resulting output are shown below: Input Output E Euros is equivalent to US Dollars Since you didnt specify a currency, Im assuming US to Euros. US Dollars is equivalent to Euros US US Dollars is equivalent to Euros No arguments Usage: number currency US or E Example: US
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
