Question: USING PYTHON . 2) Write a program that first asks the user to type in todays price of one US dollar in Euros, then reads
USING PYTHON
.
2) Write a program that first asks the user to type in todays price of one US dollar in Euros, then reads in US dollar values and converts each to Euros. Use 0 as the sentinel value to denote the end of dollar inputs. Then the program should read a sequence of Euro amounts and convert them to US Dollars. The second sequence is terminated by another zero value. Note: Google convert euro to dollar for the current conversion rate.
The program execution should look like(note: the bold values are sample user inputs):
This program converts US Dollars to Euros and Euros to US Dollars.
How many Euros are in a US Dollar today?0.88
Enter an amount in US dollars (0 to stop):25 25.0 US dollars is 22.1 Euros
Enter an amount in US dollars (0 to stop):100 100.0 US dollars is 88.38 Euros
Enter an amount in US dollars (0 to stop):0
Enter an amount in Euros (0 to quit):25 25.0 Euros is 28.29 dollars
Enter an amount in Euros (0 to quit):100 100.0 Euros is 113.15 dollars
Enter an amount in Euros (0 to quit):0
Thank you for using the conversion program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
