On Mon, Oct 8, 2012 at 11:55 AM, Tharuni Dheeraj
<tharunichowd...@gmail.com> wrote:
> please send me the program for the following que:
>
> Write a program that asks the user for a dollar amount.It then reports the
> corresponding number of euros by using the current exchange rate.
> --
> Regards,
> Tharuni Dheeraj
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
 How many euros do I get paid for this?

import urllib
usd_dollar_amount = raw_input(" Enter USD dollar amount: $")
exchange_rate =
urllib.URLopener().open("http://path_to_url_where_data_is_exracted_from.html";)
for line in exchange_rate:
        if line == line_where_usd_eur_conversion_is_listed:
                if eur < usd:
                        amount_to_account_for = (1 - eur_current_value) * 
usd_dollar_amount
                        amount_of_conversion = usd_dollar_amount - 
amount_to_account_for
print amount_of_conversion

-- 
Best Regards,
David Hutto
CEO: http://www.hitwebdevelopment.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to