Created
June 14, 2019 01:26
-
-
Save ajitesh123/19abf95040db85399f9df384ddd4efd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def main(): | |
res=requests.get("http://data.fixer.io/api/latest?access_key=XXXXXXXXXXXX") | |
if res.status_code!=200: | |
raise Exception("Error API request unsuccessful") | |
data=res.json() | |
num=data["base"] | |
print(num) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment