0% found this document useful (0 votes)
140 views17 pages

Sample Project Class Xii

This document describes a currency converter project that allows users to easily convert amounts between different currencies. The project uses a MySQL database to store currency values and Python for the programming interface. It provides conversion capabilities between Indian Rupees and other currencies as well as between any two currencies, with the goal of helping frequent travelers and traders perform currency conversions quickly and efficiently.

Uploaded by

Shasanth Control
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)
140 views17 pages

Sample Project Class Xii

This document describes a currency converter project that allows users to easily convert amounts between different currencies. The project uses a MySQL database to store currency values and Python for the programming interface. It provides conversion capabilities between Indian Rupees and other currencies as well as between any two currencies, with the goal of helping frequent travelers and traders perform currency conversions quickly and efficiently.

Uploaded by

Shasanth Control
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/ 17

MAHARISHI INTERNATIONAL

RESIDENTIAL SCHOOL
COMPUTER SCIENCE PROJECT

NAME OF STUDENTS:

CLASS & SECTION : XII –


TOPIC : CURRENCY CONVERTER
INDEX
S.No TITLE PAGE.NO
1 INTRODUCTION TO THE
PROJECT

2 OBJECTIVES OF THE
PROJECT

3 ADVANTAGES OF THE
PROPOSED SYSTEM
4 DEVELOPEMENT
ENVIRONMENT

5 FUTURE ENHANCEMENTS
6 RELATION TABLE
7 SOURCE CODE
8 OUTPUT SCREENSHOTS
9 BIBILOGRAPHY
CURRENCY CONVERTER
1) INTRODUCTION TO THE PROJECT:
“CURRENCY CONVERTER” is an
integrated project. This is introduced to provide
some basic functionality, so that it can be very
useful to the general public, especially those who
travel to different places frequently. All the data’s of
the currencies are managed by an relational
database in mysql operating system whose data are
uploaded from an csv file.

With the help of this of this program


people can find the value of their currency in terms
of other currencies easily within fraction of
seconds. So that each time people don’t have to
remember the value of each currency. Also they can
avail any kind of conversion based on their
requirements.

Finally we can conclude that this project


is very useful and efficient.
2) OBJECTIVE OF THE PROJECT:
The concept “CURRENCY
CONVERTER” is used to determine the value of a
user requested currency in terms of another
currency in a fast means of way. It keeps the data of
values of each and every country’s currency in a
relational database(mysql) in terms of Indian
currency. It serves as a user friendly currency
converter program.

3) ADVANTAGES OF THE PROPOSED


SYSTEM:
The advantages of the proposed system are:
It is fast and efficient
It works offline(without internet)
Reduces human effort(need not calculate every
time they travel)
Useful for frequent travellers and traders
It offers speed operations
The host can anytime update the values of the
currencies.
It not only provides value in terms of Indian
currency, we can perform diverse transition
from one currency to any other currency.

4) DEVELOPEMENT ENVIRONMENT:
HARDWARE REQUIREMENTS:
1. Processor : Intel(R)coretmi3 or higher
2. Memory space: Basic requirement of 2gb
ram(preferably 4Gb)
3. Hard disk drive: 40gb(minimum)
SOFTWARE REQUIREMENTS:
1. Operating system: linux-
ubuntu/windows(7-10)/Mac.Os
2. Python software: python 3.7.0
(recommended)
3. Front end : python interpreter
4. Back end : mysql , files(binary & csv)
5) FUTURE ENHANCEMENTS:
 Customised output design
 Multi-level user security
 Interactive voice response enable
system.
 Auto updating values of currency from
Google.
Sql relation:
SOURCE CODE:
import mysql.connector as sq

import pickle

db=sq.connect(host="localhost",user="root",password="R
ahulsai@2004",database="currency_convertor")

c=db.cursor()

password="MHSTAR@!123#"

def host():

db=sq.connect(host="localhost",user="root",password="Rahulsai
@2004",database="currency_convertor")

c=db.cursor()

while True:

print("1-update database")

print("2-check history")

print("3-change password")

print("4-clear history")

print("5-exit")

choice=int(input("enter your choice:"))

if choice==1:

print("a - add row")

print("b - change value")

choice1=input("enter your choice(a/b):")

if choice1.lower()=="a":
k=int(input("enter no.of rows to be inserted:"))

for i in range(k):

x1=input("enter your sql statement:")

c.execute(x1)

if choice1.lower()=="b":

k=int(input("enter no.of changes to be made:"))

for i in range(k):

x2=input("enter your sql statement:")

c.execute(x2)

elif choice==2:

try:

f=open("currency.dat","rb")

f.seek(0)

data=pickle.load(f)

for i in data:

print(i)

except EOFError:

print("the history is empty")

f.close()

elif choice==3:

p=input("enter your password:")

if p==password:
q=input("enter your new password:")

password=q

else:

print("wrong password")

elif choice==4:

f=open("currency.dat","wb")

f.close()

elif choice==5:

break

else:

print("please enter a valid choice!!")

def India_to_any(m,n):

db=sq.connect(host="localhost",user="root",password="Rahulsai
@2004",database="currency_convertor")

c=db.cursor()

final=n

sql="select indian_value from currency where


currency_name='",final,"';"

sql1=str(sql[0])+str(sql[1])+str(sql[2])

c.execute(sql1)
h=c.fetchone()

s=float(h[0])

m1=m/s

z=m,"","rupees is","",m1,"",n

n=len(z)

z1=""

for i in range(n):

z1+=str(z[i])

print(z1)

f=open("currency.dat","ab")

lst=[]

lst.append(z)

pickle.dump(lst,f)

return m1

def any_to_India(m,n):

db=sq.connect(host="localhost",user="root",password="Rahulsai
@2004",database="currency_convertor")

c=db.cursor()

initial=n

sql="select indian_value from currency where


currency_name='",initial,"';"

sql1=str(sql[0])+str(sql[1])+str(sql[2])

c.execute(sql1)
h=c.fetchone()

s=float(h[0])

m1=m*s

z=m,"",n,"is","",m1,"","rupees"

n=len(z)

z1=""

for i in range(n):

z1+=str(z[i])

print(z1)

f=open("currency.dat","ab")

lst=[]

lst.append(z)

pickle.dump(lst,f)

return m1

def any_to_any(x,x1,y1):

initial=any_to_India(x,x1)

z=India_to_any(initial,y1)

ab=x,x1,"is",z,y1

n=len(ab)

ab=""

for i in range(n):

ab+=str(ab[i])
def menu():

db=sq.connect(host="localhost",user="root",password="Rahulsai
@2004",database="currency_convertor")

c=db.cursor()

while True:

print("checking identity")

x=input("enter your identity(user/host):")

if x.lower()=="host":

for i in range(3):

n=input("enter your password:")

if n==password:

host()

break

else:

print("invalid password and u have",3-(i+1),"tries left")

elif x.lower()=="user":

c.execute("select country_name,currency_name from


currency")

for i in c:

print(i)

print("##please enter the currency name according to the


above table##")

z1=input("enter your initial currency name;")


z2=float(input("enter your initial amount:"))

z3=input("enter the currency to which you want to


convert:")

if z1=="rupees":

India_to_any(z2,z3)

elif z3=="rupees":

any_to_India(z2,z1)

else:

any_to_any(z1,z2,z3)

menu()
NOTE: OUTPUT SCREENSHOTS HAS BE ATTACHED.

OUTPUT:
BIBILOGRAPHY (FROM WHERE DID
YOU TAKE REFERENCE) SHOULD
COMPULSARILY BE ATTACHED

You might also like