Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Project Details

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Kendriya Vidyalaya MEG & Centre

Computer science
PROJECT REPORT
GRADE – XII
PROJECT PREPARED BY: jai suriya ,Rahul, jude flex
NAME OF THE STUDENT : Jai suriya
ROLL NUMBER : …12223
PROJECT TOPIC : Real-time currency converter

2023 – 2024
CERTIFICATE
This is to certify that the project work entitled. ".........
............Real time currency converter…………………………….”
is a bonafide record of work done by………Jai..suriya……… , Roll
no:……12223………….…in partial fulfilment for the award of 12th
standard during the academic year 2022 - 2023.
Date:
Registration No.:

Signature of Internal Signature of External


Examiner Examiner

Signature of Principal
ACKNOWLEDGEMENT
I would like to take this opportunity to express my
deep sense of gratitude to all those people without whom
this project could have never been completed. First and
foremost I like to thank God for giving me such a great
opportunity to work on this project, and I would like to
express my special thanks and gratitude to the
Management, the Directors and the Correspondent of KV
MEG & Centre, for their constant guidance and providing a
very nice platform to learn.
I would also like to thank our Principal –Mr Lokesh
Bihari Sharma sir, for his constant encouragement and
moral support without which I would have never be able to
give my best.
I would also like to thank Mrs Sumita ma’am, Computer
Science Teacher, who gave me the wonderful opportunity
to do this project, which also helped me in doing a lot of
research and I came to know about so many new things
from this study I am really thankful to all.
Index
S.N Contents Pg.No Signatur
o e
1 SYSTEM REQUIREMENT
2 FEASIBILITY STUDY
3 ERRORS AND ITS TYPES
4 TESTING
5 MAINTENANCE
6 FUNCTION USED
7 FLOW CHART OF PROGRAM
8 SOURCE CODE
9 OUTPUT
10 CONCLUSION
11 BIBLIOGRAPHY
PROJECT REPORT: REAL-TIME
CURRENCY CONVERTER
1. INTRODUCTION
The Real-Time Currency Converter is a Python application designed to provide users
with instant and accurate currency conversion. This report outlines the system
requirements, feasibility study, error handling, testing, maintenance, functions used, flow
chart, source code, output, conclusion, and references for the project.
2. SYSTEM REQUIREMENTS
2.1 HARDWARE REQUIREMENTS
 Processor: Dual-core processor or higher
 RAM: 2 GB or higher
 Storage: 50 MB of free disk space
2.2 SOFTWARE REQUIREMENTS
 Operating System: Windows 7 or later, macOS, Linux
 Python: Version 3.6 or higher
 Tkinter: Installed with Python
 ttkthemes: Install using pip install ttkthemes
 forex-python: Install using pip install forex-python
3. FEASIBILITY STUDY
3.1 TECHNICAL FEASIBILITY
The project utilizes well-established technologies such as Python, Tkinter, and forex-
python. These technologies are widely used, ensuring technical feasibility.
3.2 OPERATIONAL FEASIBILITY
The application's user-friendly interface makes it easy for users to perform currency
conversions, enhancing operational feasibility.
3.3 ECONOMIC FEASIBILITY
The project is cost-effective, utilizing open-source technologies. There are no licensing
costs, contributing to economic feasibility.
4. ERRORS AND ITS TYPES
The Real-Time Currency Converter includes error handling to enhance robustness.
4.1 TYPES OF ERRORS
 Invalid Amount Error: Raised when the entered amount is not a positive number.
 Same Currency Error: Raised when the source and target currencies are the same.
 Unexpected Error: Captures any unexpected errors during the conversion process.
5. TESTING
The application underwent thorough testing to ensure functionality and error handling.
5.1 UNIT TESTING
Individual functions and components were tested independently.
5.2 INTEGRATION TESTING
Testing of the entire system to ensure components work together.
5.3 USER ACCEPTANCE TESTING (UAT)
End-users performed testing to validate the application's usability.
6. MAINTENANCE
The project is designed for ease of maintenance. Future updates or enhancements can
be easily implemented.
7. FUNCTIONS USED
The key functions used in the application include:
 get_currency_list: Retrieves the list of available currencies.
 convert_currency: Handles the currency conversion logic.
 get_currency_symbol: Retrieves the currency symbol based on the currency code.
8. FLOW CHART OF PROGRAM
A simplified flowchart illustrating the program's execution is shown below:
[Flowchart Image]
9. SOURCE CODE
import tkinter as tk
from tkinter import ttk
from ttkthemes import ThemedStyle
from forex_python.converter import CurrencyRates, CurrencyCodes
class CurrencyConverterApp:
def __init__(self, root):
self.root = root
self.root.title("Real-Time Currency Converter")

# Set window size and default currency values


self.root.geometry("800x600")
self.from_currency_var = tk.StringVar(value="INR")
self.to_currency_var = tk.StringVar(value="USD")

# Create GUI elements


self.create_widgets()

def create_widgets(self):
# Styling
style = ThemedStyle(self.root)
style.set_theme("equilux")

# Customize the style for Label and Button widgets


style.configure('White.TLabel', foreground='white', font=('Helvetica', 18, 'bold'))
style.configure('White.TButton', foreground='white', font=('Helvetica', 14, 'bold'))
style.configure('Cursive.TLabel', font=('cursive', 14))
style.configure('MadeBy.TLabel', foreground='white', font=('Helvetica', 12))
# Main Frame
main_frame = ttk.Frame(self.root)
main_frame.pack(fill=tk.BOTH, expand=True, padx=20, pady=20)

# Title Label
title_label = ttk.Label(main_frame, text="Currency Converter", style='White.TLabel')
title_label.pack(pady=20)

# Amount Entry
amount_label = ttk.Label(main_frame, text="Amount:", style='White.TLabel')
amount_label.pack(pady=10)
self.amount_entry = ttk.Entry(main_frame, font=("cursive", 14))
self.amount_entry.pack(pady=10)

# From Currency
from_currency_label = ttk.Label(main_frame, text="From Currency:",
style='Cursive.TLabel')
from_currency_label.pack(pady=10)
self.from_currency_combobox = ttk.Combobox(main_frame,
textvariable=self.from_currency_var, values=self.get_currency_list(),
font=("cursive", 14))
self.from_currency_combobox.pack(pady=10)

# To Currency
to_currency_label = ttk.Label(main_frame, text="To Currency:",
style='Cursive.TLabel')
to_currency_label.pack(pady=10)
self.to_currency_combobox = ttk.Combobox(main_frame,
textvariable=self.to_currency_var, values=self.get_currency_list(),
font=("cursive", 14))
self.to_currency_combobox.pack(pady=10)

# Convert Button
convert_button = ttk.Button(main_frame, text="Convert",
style="TButton.Convert.TButton", command=self.convert_currency)
convert_button.pack(pady=20)

# Result Label
self.result_var = tk.StringVar()
result_label = ttk.Label(main_frame, textvariable=self.result_var, style='White.TLabel',
wraplength=600)
result_label.pack(pady=20)

# Made by Label
made_by_label = ttk.Label(main_frame, text="Made by Jude Felix, Rahul D, and Jai
Surya of class 12 B", style='MadeBy.TLabel')
made_by_label.pack(pady=20)

def get_currency_list(self):
# Add more currencies as needed
return ["USD", "EUR", "GBP", "INR", "JPY"]
def convert_currency(self):
try:
amount = float(self.amount_entry.get())
from_currency = self.from_currency_var.get()
to_currency = self.to_currency_var.get()

if amount <= 0:
raise ValueError("Amount should be a positive number.")

if from_currency == to_currency:
raise ValueError("Source and target currencies cannot be the same.")

c = CurrencyRates()
rate = c.get_rate(from_currency, to_currency)
result = amount * rate

self.result_var.set(f"{amount:.2f} {self.get_currency_symbol(from_currency)} =
{result:.2f} {self.get_currency_symbol(to_currency)}")

except ValueError as ve:


self.result_var.set(f"Error: {ve}")
except Exception as e:
self.result_var.set(f"Unexpected Error: {e}")
def get_currency_symbol(self, currency_code):
# Add more currency symbols as needed
symbols = {"USD": "$", "EUR": "€", "GBP": "£", "INR": "₹", "JPY": "¥"}
return symbols.get(currency_code, currency_code)

if __name__ == "__main__":
root = tk.Tk()
app = CurrencyConverterApp(root)
root.mainloop()

10. OUTPUT
11. CONCLUSION
The Real-Time Currency Converter project successfully achieves its goal of providing
users with an efficient and user-friendly tool for currency conversion. The inclusion of
error handling, testing, and a well-structured codebase ensures a reliable and
maintainable application.
12. BIBLIOGRAPHY
 Python Documentation: https://docs.python.org/
 Tkinter Documentation: https://docs.python.org/3/library/tkinter.html
 ttkthemes Documentation: https://ttkthemes.readthedocs.io/en/latest/
 forex-python Documentation: https://forex-python.readthedocs.io/en/latest/

You might also like