Are you looking to build a solid career in Python? If Yes, you have to work on projects. DataFlair is devoted to make you a successful Python Developer. After tons of tutorials, practicals, interview questions, we are coming with a series of projects from beginner to advanced level.
In this tutorial, we are going to build an exciting python project through which you can convert currencies. For a user interface, we are going to use the tkinter library
The currency converter project in python requires you to have basic knowledge of python programming and the pygame library.
To install the tkinter and requests library, type the following code in your terminal:
pip install tkinter
pip install requests
To get real-time exchange rates, we will use: https://api.exchangerate-api.com/v4/latest/USD
Here, we can see the data in JSON format, with the following details:
Base – USD: It means we have our base currency USD. which means to convert any currency we have to first convert it to USD then from USD, we will convert it in whichever currency we want.
Date and time: It shows the last updated date and time.
Rates: It is the exchange rate of currencies with base currency USD.
For this project based on Python, we are using the tkinter and requests library. So we need to import the library.
import requests
from tkinter import *
import tkinter as tk
from tkinter import ttk
#python tutorials #python #programming