Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python - exchange rate API

import requests

APP_ID = "**********************"
ENDPOINT = "https://openxchangerates.org/latest.json"
response = requests.get(f"{ENDPOINT}?app_id={APP:ID}")
exchange_rate = response.json()["rates"]
usd_amount = 1000
gbp_amount = usd_amount * exchange_rate["GBP"]
print(f"USD{usd_amount} is GBP{gbp_amount}")				
Comment

PREVIOUS NEXT
Code Example
Python :: python sum of natural numbers recursion 
Python :: python execute file 
Python :: python writeline file 
Python :: python split sentence into words 
Python :: libreoffice add line in table 
Python :: get last file in directory python 
Python :: how to find the text inside button in tkinter 
Python :: print type(x) in python 
Python :: google colab how to upload a folder 
Python :: highlight max value in table pandas dataframe 
Python :: parse list from string 
Python :: plot distribution seaborn 
Python :: numpy compute mad 
Python :: get time in ms python 
Python :: user nextcord interactions 
Python :: Local to ISO 8601 with TimeZone information (Python 3): 
Python :: reload function jupyter notebook 
Python :: real time crypto prices python 
Python :: install qt designer python ubuntu 
Python :: how to convert multi list to dict 
Python :: how to write your first python program 
Python :: pil python 
Python :: how to detect an even number in python 
Python :: print hello world in python 
Python :: string to datetime python 
Python :: mean of torch tensor 
Python :: python typeddict 
Python :: python dataframe shape 
Python :: pd get non-numeric columns 
Python :: clear cookies selenium python 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =