Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

PROJECT PROPOSAL (BCSP-064)

INDIRA GANDHI NATIONAL OPEN UNIVERSITY

BCA SYNOPSIS
SYNOPSIS SUMMARY
SUBJECT/TITLE : SCIENTIFIC CALCULATOR
PROJECT COURSE CODE : BCSP-064
PROJECT CATEGORIES :
FRONT END & BACK END SOFTWARE TOOLS :
GUIDED BY : ASHISH MANAV
PREPD. AND SUBMITED BY : AYUSH MANAV
ROLL NO. / ENROLLMENT NUMBER : 2004005391
UNIVERSITY NAME : INDIRA GANDHI NATIONAL OPEN UNIVERSITY
REGIONAL CENTER/INSTITUTE NAME & CODE (If any) : 0500 (IGNOU
REGIONAL CENTRE PATNA INSTITUTIONAL AREA MITHAPUR)
COLLEGE/STUDY CENTRE NAME & CODE (If any) : 0568(T P S COLLEGE
CHIRAIYATAND PATNA, BIHAR)
FULL CORRESPONDENCE ADDRESS :
MOBILE NO. :
EMAIL ID :
DATE :

 TITLE OF THE PROJECT PROPOSAL: SCIENTIFIC CALCULATOR


 NAME OF THE LEARNER:

 ENROLLMENT NO:

 PROGRAM CODE: BCA

 MOBILE NO:

 EMAIL ID:

 STUDY CENTRE CODE: 0568(T P S COLLEGE CHIRAIYATAND


PATNA, BIHAR)

 REGIONAL CENTRE CODE: 0500(IGNOU REGIONAL CENTRE


PATNA INSTITUTIONAL AREA MITHAPUR)
TITLE OF THE PROJECT

SCIENTIFIC CALCULATOR
INTRODUCTION

Scientific Calculator:
The calculator was written by Rolf Howarth in early 1996.

A fully featured scientific calculator with proper operator


precedence is implemented, including trig functions and
logarithms, factorials, 12 levels of parentheses, logs to base
2 (a handy function for information entropists!), bitwise
logical operators, hex, octal, binary and ASCII display.

The calculator is written in JavaScript and you are welcome to


view the JavaScript source (visible within the HTML page) for
personal educational purposes as long as you recognize that it
is copyrighted and NOT in the public domain. This calculator is
now available as part of Hummingbird's Enterprise
Information Portal. All enquiries regarding licensing the
calculator should be directed to Hummingbird Ltd.
OBJECTIVE OF THE PROJECT

The objective of this project is to create a scientific calculator using


python which can be used in any web application or webpage.
A scientific calculator application. It is used to calculate the math
functions easily.
In this application two types of calculators are there
1.standard calculator
2.scientific calculator
first one is very simple to solve arithmetic operations. And also convert
the result into either integer or float pointing number.
And then second one is scientific notation type math functions are
there like sin, cos, tan, log etc. it is very useful to solve the odd math
calculations in less time and in simple manner and also easily to use.
Especially I used menu bar with two items one is standard and second
one is scientific
after clicking the standard item it will shows the standard calculator
after clicking the scientific item it will shows the scientific calculator
with standard also.
By using Tkinter in python I developed this application it is also
converted into exe file by using pyinstaller then it is now a desktop
application.
Lastly it shows desktop icon in out system if you install it otherwise not
show in your desktop.
PROJECT CATEGORY

PYTHON
SYSTEM ANALYSIS

The following documentation is a project the “Scientific Calculator”. It


is a detailed
summary of all the drawbacks of the old system and how the new
proposed system overcomes these shortcomings. The new system
takes into account the various factors while designing a new system. It
keeps into the account the Economical bandwidth available for the new
system. The foremost thing that is taken care of is the Need and
Requirements of the User.

DESCRIPTION:
Before developing software, we keep following things in mind that we
can develop powerful and quality software

PROBLEM STATEMENT:
 Problem statement was to design a module:
 Which is user friendly
 Which will restrict the user from accessing other user’s data.
 Which will help user in viewing his data and privileges.
 Which will help the administrator to handle all the changes.
FUNCTIONS TO BE PROVIDED:
The system will be user friendly and completely menu driven so that
the users shall have no problem in using all options.

 The system will be efficient and fast in response.


 The system will be customized according to needs.

SYSTEM REQUIRMENTS:
Operating system: MS Windows XP or Windows 10
Language: C Language
Processor: Pentium IV Processor RAM: 512 MB Hard disk: 2 GB

SYSTEM DESIGN:
Then we began with the design phase of the system.
System design is a solution, a “HOW TO” approach to
the creation of a new system. It translates system
requirements into ways by which they can be made
operational. It is a translational from a user oriented
document to a document oriented programmers. For
that, it provides the understanding and procedural
details necessary for the implementation. Here we
use Flowchart to supplement the working of the new
system.
The system thus made should be reliable, durable and
above all should have least possible maintenance
costs. It should overcome all the drawbacks of the Old
existing system and most important of all meet the
user requirements. We will use Tkinter, Parser and
Math function of python module to create this
project. Next we will make windows for our calculator
which will accommodate the buttons by using TK(),
title() and mainloop().
Then we will design the buttons for our calculator and
put them on our application window. For this we will
be using Button(). In this calculator program in
python, the “Entry” function helps in making a text
input field and we use .grid() method to define the
positioning associated with the button or input field.
We use the button method to display a button on our
application window.
• root – the name with which we refer to our
window
• text – text to be displayed on the button
• row – row index of the grid
• column – column index of the grid
• columnspan – spans or combines the number of
columns
• sticky – If the resulting cell is larger than the
widget then sticky defines how to expand the widget.
The combination of constants used S, N, E, and W, or
NW, NE, SW, and SE are analogous to the directions in
compass. N+E+W+S means that the widget should be
expanded in all directions.

When you run the above code, you will get calculator output like this.

BASIC FUNCTIONS
 Addition
The addition (sum function) is used by clicking on the "+"
button or using the keyboard. The function results in a+b.

 Subtraction
The subtraction (minus function) is used by clicking on the "-"
button or using the keyboard.
The function results in a-b.

 Multiplication

The multiplication (times function) is used by clicking on the "x"


button or using the keyboard "*" key. The function results in
a*b.

 Division

The division (divide function) is used by clicking on the "/"


button or using the keyboard "/" key. The function results in
a/b.
 Sign
The sign key (negative key) is used by clicking on the "(-)" button.
The function results in -1*x.

 Square

 The square function is used by clicking on the "x^2" button or


type "^2". The function results in x*x.
 Square Root
 The square root function is used by clicking on the "x"
button or type "sqrt()". This function represents x^.5
where the result squared is equal to x
 Raise to the Power
 The raise to the power (y raised to the x function) is
used by clicking on the "y^x" button
 or type "^".

 Natural Exponential
 The natural exponential (e raised to the x) is used by
clicking on the "e^x" button
 or type "exp()". The result is e (2.71828...)
raised to x.

 Logarithm
 The logarithm (LOG) is used by clicking on the
"LOG" button or type "LOG()".

 Natural Logarithm
 The Natural logarithm (LN) is used by clicking on the
"LN" button or type "LN()".

 Inverse
 Multiplicative inverse (reciprocal function) is used by
pressing the "1/x" button
 or typing "inv()". This function is the same
as x^-1 or dividing 1 by the number.

 Exponent
Numbers with exponents of 10 are displayed with an
"e", for example 4.5e+100 or 4.5e-100.
This function represents 10^x. Numbers are
automatically displayed in the format when the
number is too large or too small for the display. To
enter a number in this format use the
exponent key "EEX". To do this enter the
mantissa (the non exponent part) then press
"EEX" or
type"e" and then enter the exponent.

 Factorial
The Factorial function is used by clicking the "!
" button or type "!".

 PI
PI is a mathematical constant of the ratio of a
circle's circumference to its diameter.

Coding
from tkinter import *
import math
import tkinter.messagebox

root = Tk()
root.title("Scientific Calculator")
root.configure(background = 'white')
root.resizable(width=False, height=False)
root.geometry("480x568+450+90")
calc = Frame(root)
calc.grid()

class Calc():
def __init__(self):
self.total=0
self.current=''
self.input_value=True
self.check_sum=False
self.op=''
self.result=False

def numberEnter(self, num):


self.result=False
firstnum=txtDisplay.get()
secondnum=str(num)
if self.input_value:
self.current = secondnum
self.input_value=False
else:
if secondnum == '.':
if secondnum in firstnum:
return
self.current = firstnum+secondnum
self.display(self.current)

def sum_of_total(self):
self.result=True
self.current=float(self.current)
if self.check_sum==True:
self.valid_function()
else:
self.total=float(txtDisplay.get())

def display(self, value):


txtDisplay.delete(0, END)
txtDisplay.insert(0, value)
def valid_function(self):
if self.op == "add":
self.total += self.current
if self.op == "sub":
self.total -= self.current
if self.op == "multi":
self.total *= self.current
if self.op == "divide":
self.total /= self.current
if self.op == "mod":
self.total %= self.current
self.input_value=True
self.check_sum=False
self.display(self.total)

def operation(self, op):


self.current = float(self.current)
if self.check_sum:
self.valid_function()
elif not self.result:
self.total=self.current
self.input_value=True
self.check_sum=True
self.op=op
self.result=False

def Clear_Entry(self):
self.result = False
self.current = "0"
self.display(0)
self.input_value=True

def All_Clear_Entry(self):
self.Clear_Entry()
self.total=0

def pi(self):
self.result = False
self.current = math.pi
self.display(self.current)

def tau(self):
self.result = False
self.current = math.tau
self.display(self.current)

def e(self):
self.result = False
self.current = math.e
self.display(self.current)

def mathPM(self):
self.result = False
self.current = -(float(txtDisplay.get()))
self.display(self.current)

def squared(self):
self.result = False
self.current = math.sqrt(float(txtDisplay.get()))
self.display(self.current)

def cos(self):
self.result = False
self.current =
math.cos(math.radians(float(txtDisplay.get())))
self.display(self.current)

def cosh(self):
self.result = False
self.current =
math.cosh(math.radians(float(txtDisplay.get())))
self.display(self.current)

def tan(self):
self.result = False
self.current =
math.tan(math.radians(float(txtDisplay.get())))
self.display(self.current)

def tanh(self):
self.result = False
self.current =
math.tanh(math.radians(float(txtDisplay.get())))
self.display(self.current)

def sin(self):
self.result = False
self.current =
math.sin(math.radians(float(txtDisplay.get())))
self.display(self.current)

def sinh(self):
self.result = False
self.current =
math.sinh(math.radians(float(txtDisplay.get())))
self.display(self.current)

def log(self):
self.result = False
self.current = math.log(float(txtDisplay.get()))
self.display(self.current)

def exp(self):
self.result = False
self.current = math.exp(float(txtDisplay.get()))
self.display(self.current)

def acosh(self):
self.result = False
self.current = math.acosh(float(txtDisplay.get()))
self.display(self.current)

def asinh(self):
self.result = False
self.current = math.asinh(float(txtDisplay.get()))
self.display(self.current)

def expm1(self):
self.result = False
self.current = math.expm1(float(txtDisplay.get()))
self.display(self.current)

def lgamma(self):
self.result = False
self.current = math.lgamma(float(txtDisplay.get()))
self.display(self.current)

def degrees(self):
self.result = False
self.current = math.degrees(float(txtDisplay.get()))
self.display(self.current)

def log2(self):
self.result = False
self.current = math.log2(float(txtDisplay.get()))
self.display(self.current)

def log10(self):
self.result = False
self.current = math.log10(float(txtDisplay.get()))
self.display(self.current)

def log1p(self):
self.result = False
self.current = math.log1p(float(txtDisplay.get()))
self.display(self.current)

added_value = Calc()

txtDisplay = Entry(calc, font=('Helvetica',20,'bold'),


bg='black',fg='white',
bd=30,width=28,justify=RIGHT)
txtDisplay.grid(row=0,column=0, columnspan=4, pady=1)
txtDisplay.insert(0,"0")

numberpad = "789456123"
i=0
btn = []
for j in range(2,5):
for k in range(3):
btn.append(Button(calc, width=6, height=2,
bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,text=numberpad[i]))
btn[i].grid(row=j, column= k, pady = 1)
btn[i]["command"]=lambda
x=numberpad[i]:added_value.numberEnter(x)
i+=1

btnClear = Button(calc, text=chr(67),width=6,


height=2,bg='powder blue',
font=('Helvetica',20,'bold')
,bd=4, command=added_value.Clear_Entry
).grid(row=1, column= 0, pady = 1)

btnAllClear = Button(calc, text=chr(67)+chr(69),


width=6, height=2,
bg='powder blue',
font=('Helvetica',20,'bold'),
bd=4,

command=added_value.All_Clear_Entry
).grid(row=1, column= 1, pady = 1)

btnsq = Button(calc, text="\u221A",width=6, height=2,


bg='powder blue', font=('Helvetica',
20,'bold'),
bd=4,command=added_value.squared
).grid(row=1, column= 2, pady = 1)

btnAdd = Button(calc, text="+",width=6, height=2,


bg='powder blue',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.operation("add")
).grid(row=1, column= 3, pady = 1)

btnSub = Button(calc, text="-",width=6,


height=2,bg='powder blue',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.operation("sub")
).grid(row=2, column= 3, pady = 1)

btnMul = Button(calc, text="x",width=6,


height=2,bg='powder blue',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.operation("multi")
).grid(row=3, column= 3, pady = 1)

btnDiv = Button(calc, text="/",width=6,


height=2,bg='powder blue',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.operation("divide")
).grid(row=4, column= 3, pady = 1)

btnZero = Button(calc, text="0",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.numberEnter(0)
).grid(row=5, column= 0, pady = 1)
btnDot = Button(calc, text=".",width=6,
height=2,bg='powder blue',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.numberEnter(".")
).grid(row=5, column= 1, pady = 1)
btnPM = Button(calc, text=chr(177),width=6,
height=2,bg='powder blue',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.mathPM
).grid(row=5, column= 2, pady = 1)

btnEquals = Button(calc, text="=",width=6,


height=2,bg='powder blue',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.sum_of_total
).grid(row=5, column= 3, pady = 1)
# ROW 1 :
btnPi = Button(calc, text="pi",width=6,
height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.pi
).grid(row=1, column= 4, pady = 1)

btnCos = Button(calc, text="Cos",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.cos
).grid(row=1, column= 5, pady = 1)

btntan = Button(calc, text="tan",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.tan
).grid(row=1, column= 6, pady = 1)

btnsin = Button(calc, text="sin",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.sin
).grid(row=1, column= 7, pady = 1)

# ROW 2 :
btn2Pi = Button(calc, text="2pi",width=6,
height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.tau
).grid(row=2, column= 4, pady = 1)

btnCosh = Button(calc, text="Cosh",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.cosh
).grid(row=2, column= 5, pady = 1)

btntanh = Button(calc, text="tanh",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.tanh
).grid(row=2, column= 6, pady = 1)

btnsinh = Button(calc, text="sinh",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.sinh
).grid(row=2, column= 7, pady = 1)

# ROW 3 :
btnlog = Button(calc, text="log",width=6,
height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.log
).grid(row=3, column= 4, pady = 1)

btnExp = Button(calc, text="exp",width=6, height=2,


bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.exp
).grid(row=3, column= 5, pady = 1)

btnMod = Button(calc, text="Mod",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),

bd=4,command=lambda:added_value.operation("mod")
).grid(row=3, column= 6, pady = 1)

btnE = Button(calc, text="e",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.e
).grid(row=3, column= 7, pady = 1)

# ROW 4 :
btnlog10 = Button(calc, text="log10",width=6,
height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.log10
).grid(row=4, column= 4, pady = 1)

btncos = Button(calc, text="log1p",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.log1p
).grid(row=4, column= 5, pady = 1)

btnexpm1 = Button(calc, text="expm1",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd = 4,command=added_value.expm1
).grid(row=4, column= 6, pady = 1)

btngamma = Button(calc, text="gamma",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.lgamma
).grid(row=4, column= 7, pady = 1)
# ROW 5 :
btnlog2 = Button(calc, text="log2",width=6,
height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.log2
).grid(row=5, column= 4, pady = 1)

btndeg = Button(calc, text="deg",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.degrees
).grid(row=5, column= 5, pady = 1)

btnacosh = Button(calc, text="acosh",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.acosh
).grid(row=5, column= 6, pady = 1)

btnasinh = Button(calc, text="asinh",width=6,


height=2,bg='black',fg='white',
font=('Helvetica',20,'bold'),
bd=4,command=added_value.asinh
).grid(row=5, column= 7, pady = 1)

lblDisplay = Label(calc, text = "Scientific Calculator",


font=('Helvetica',30,'bold'),
bg='black',fg='white',justify=CENTER)

lblDisplay.grid(row=0, column= 4,columnspan=4)

def iExit():
iExit = tkinter.messagebox.askyesno("Scientific Calculator",
"Do
you want to exit ?")
if iExit>0:
root.destroy()
return

def Scientific():
root.resizable(width=False, height=False)
root.geometry("944x568+0+0")

def Standard():
root.resizable(width=False, height=False)
root.geometry("480x568+0+0")

menubar = Menu(calc)

# ManuBar 1 :
filemenu = Menu(menubar, tearoff = 0)
menubar.add_cascade(label = 'File', menu = filemenu)
filemenu.add_command(label = "Standard", command = Standard)
filemenu.add_command(label = "Scientific", command = Scientific)
filemenu.add_separator()
filemenu.add_command(label = "Exit", command = iExit)

# ManuBar 2 :
editmenu = Menu(menubar, tearoff = 0)
menubar.add_cascade(label = 'Edit', menu = editmenu)
editmenu.add_command(label = "Cut")
editmenu.add_command(label = "Copy")
editmenu.add_separator()
editmenu.add_command(label = "Paste")

root.config(menu=menubar)

root.mainloop()
APPLICATIONS

In most countries, students use calculators for schoolwork. There was


some initial resistance to the idea out of fear that basic arithmetic
skills would suffer. There remains disagreement about the
importance of the ability to perform calculations "in the head", with
some curricula restricting calculator use until a certain level of
proficiency has been obtained, while others concentrate more on
teaching estimation techniques and problem-solving. Research
suggests that inadequate guidance in the use of calculating tools can
restrict the kind of mathematical thinking that students engage in.
Others have argued that calculator use can even cause core
mathematical skills to atrophy, or that such use can prevent
understanding of advanced algebraic concepts.

There are other concerns - for example, that a pupil could use the
calculator in the wrong fashion but believe the answer because that
was the result given. Teachers try to combat this by encouraging the
student to make an estimate of the result manually and ensuring it
roughly agrees with the calculated result. Also, it is possible for a child
to type in −1 × −1 and obtain the correct answer '1' without realizing
the principle involved. In this sense, the calculator becomes a crutch
rather than a learning tool, and it can slow down students in exam
conditions as they check even the most trivial result on a calculator.
TESTING

Testing is the major control measure used during software development.


Its basic function is to detect errors in the software. During requirement
analysis and design, the output is a document that is usually textual and
no executable. After the coding phase, computer programs are available
that can be executed for testing purpose. This implies that testing not
only, has to uncover errors introduced during coding, but also errors
introduced during previous phase. Thus the goal of testing is to uncover
the requirements, design and coding errors in the programs.
TheSourcecode declared above for the program of Scientific Calculator
has been tested and it has been found that the above source code is
okay and correct.The program involves many type of conversions.
These conversions has to done carefully.

FUTURE SCOPE OF THE PROJECT

Our project will be able to implement in future after making some


changes and modifications as we make our project at a very low level.
So the modifications that can be done in our project are:

To make it screen touch so no need to touch key buttons and one more
change which can we made is to add snaps of the person who use it.
SYNOPSIS

You might also like