Python is a very versatile programming language. Python is being used in almost each mainstream technology and one can develop literally any application with it. Let’s see a Python program to convert the currency of one country to that of another country. To use this service, one must need the API key, which can be get form here.
We will use
fixer API to get the live conversion rates and convert the corresponding amount.
requests: This module does not built-in with python. To install it type the below command in the terminal or cmd.
pip install requests
Below is the implementation:
From Country: USD TO Country: INR Amount: 1
1 USD = 70.69 INR
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.