Answer:
The program in Python is as follows:
def USD2EUR(amount):
EUR = 0.831467 * amount
return EUR
def USD2GBP(amount):
GBP = 0.71 * amount
return GBP
def USD2JPY(amount):
JPY = 109.26 * amount
return JPY
USD = float(input("USD: "))
print("Euro: ",USD2EUR(USD))
print("GBP: ",USD2GBP(USD))
print("JPY: ",USD2JPY(USD))
Step-by-step explanation:
This defines the USD2EUR function
def USD2EUR(amount):
This converts USD to Euros
EUR = 0.831467 * amount
This returns the equivalent amount in EUR
return EUR
This defines the USD2GBP function
def USD2GBP(amount):
This converts USD to GBP
GBP = 0.71 * amount
This returns the equivalent amount in GBP
return GBP
This defines the USD2JPY function
def USD2JPY(amount):
This converts USD to JPY
JPY = 109.26 * amount
This returns the equivalent amount in JPY
return JPY
The main begins here
This gets input for USD
USD = float(input("USD: "))
The following passes USD to each of the defined functions
print("Euro: ",USD2EUR(USD))
print("GBP: ",USD2GBP(USD))
print("JPY: ",USD2JPY(USD))
Note the program used current exchange rates for GBP and JPY, as the rates were not provided in the question