0% found this document useful (0 votes)
48 views6 pages

Currency Converter Project

The Currency Converter Project is a Class 11 Informatics Practices assignment that demonstrates a basic currency converter using Python and libraries like forex-python and tkinter. It allows users to convert currencies in real-time with a user-friendly interface. The project showcases practical programming skills and the integration of external libraries for functionality.

Uploaded by

inayat7567
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views6 pages

Currency Converter Project

The Currency Converter Project is a Class 11 Informatics Practices assignment that demonstrates a basic currency converter using Python and libraries like forex-python and tkinter. It allows users to convert currencies in real-time with a user-friendly interface. The project showcases practical programming skills and the integration of external libraries for functionality.

Uploaded by

inayat7567
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Currency Converter Project

Class 11 - Informatics Practices

Submitted by:

Name: Inayat Husain

Class: 11th B

Roll No: 11218

School: PM Shri Kendriya Vidyalaya Narsinghpur

Date of Submission: 05 February 2025


Introduction

A currency converter is a tool that allows users to convert one currency to another based on current

exchange rates. It is widely used in businesses, travel, and international trade. This project

demonstrates a basic currency converter using programming concepts from Informatics Practices.
Technical Details

The currency converter project involves the following technical aspects:

1. **Programming Language**: Python

2. **Libraries Used**: forex-python for exchange rates, tkinter for GUI

3. **Algorithm**:

- Take input for the amount and the source currency.

- Allow the user to select the target currency.

- Fetch the exchange rate using the forex-python library.

- Perform the conversion and display the result.

4. **Features**:

- Real-time exchange rates

- User-friendly interface

- Supports multiple currencies


Source Code

from forex_python.converter import CurrencyRates

from tkinter import *

def convert_currency():

c = CurrencyRates()

amount = float(amount_entry.get())

from_currency = from_entry.get()

to_currency = to_entry.get()

result = c.convert(from_currency, to_currency, amount)

result_label.config(text=f'Result: {result:.2f} {to_currency}')

# GUI Setup

root = Tk()

root.title('Currency Converter')

Label(root, text='Amount').grid(row=0, column=0)

amount_entry = Entry(root)

amount_entry.grid(row=0, column=1)

Label(root, text='From Currency').grid(row=1, column=0)

from_entry = Entry(root)

from_entry.grid(row=1, column=1)

Label(root, text='To Currency').grid(row=2, column=0)

to_entry = Entry(root)
to_entry.grid(row=2, column=1)

Button(root, text='Convert', command=convert_currency).grid(row=3, column=1)

result_label = Label(root, text='Result: ')

result_label.grid(row=4, column=1)

root.mainloop()
Conclusion

This project highlights the application of Python programming in developing a functional and

user-friendly currency converter. It demonstrates the use of external libraries, GUI development, and

real-time data integration. Such projects are valuable for understanding practical applications of

coding skills.

You might also like