Automatically update variable data from the web in Python programming lanuage

39 views Asked by At

I have that little program

dol_rate = 0.84072
eur_rate = 1.18957

what = input("Select (A) DOL->EUR or (B) EUR->DOL: ")

if what == "A" or what == "a":
price1 = input("Enter a certain amount of US dollars: ")

doltoeur = int(price1) * dol_rate

print(doltoeur,"€")

etc...

And I want to know if there is any way to update the dol_rate and eur_rate variables automatically from the web with the current dollar and euro price.

0

There are 0 answers