1import requests
2
3APP_ID = "**********************"
4ENDPOINT = "https://openxchangerates.org/latest.json"
5response = requests.get(f"{ENDPOINT}?app_id={APP:ID}")
6exchange_rate = response.json()["rates"]
7usd_amount = 1000
8gbp_amount = usd_amount * exchange_rate["GBP"]
9print(f"USD{usd_amount} is GBP{gbp_amount}")