MINOR PROJECT
INTRODUCTION
In the modern age of technology and education, calculators have become indispensable tools
in various fields of study and professional work. Among them, the scientific calculator
stands out as a versatile and powerful device designed to perform a wide range of complex
mathematical functions. Unlike basic calculators, which are limited to simple arithmetic
operations such as addition, subtraction, multiplication, and division, scientific calculators
are equipped with advanced features that make them essential for students, engineers,
scientists, and professionals who deal with higher-level mathematics and scientific
computations.
A scientific calculator supports functions that include, but are not limited
to, trigonometric calculations (such as sine, cosine, tangent, and their inverses), logarithmic
and exponential operations, powers and roots, factorials, permutations and combinations,
statistical functions (mean, standard deviation, variance, etc.), and sometimes even
operations involving complex numbers and matrices. These features are particularly useful in
subjects like algebra, geometry, trigonometry, calculus, physics, chemistry, and statistics.
In educational institutions, scientific calculators have become a standard part of
the learning toolkit, aiding students in understanding and solving intricate mathematical
problems. In the professional world, they play a crucial role in engineering design, scientific
research, financial modelling, and data analysis. Whether in the classroom or the workplace,
scientific calculators provide accuracy, efficiency, and reliability, making them a cornerstone
in the application of mathematics and science.
Functions
Modern scientific calculators generally have many more features than a standard four or
five function calculator, and the feature set differs between manufacturers and models;
However, the defining features of a scientific calculator include:
scientific notation
floating point arithmetic
logarithmic functions, using both base 10 and base e
trigonometric functions (some including hyperbolic trigonometry)
exponential functions and roots beyond the square root
quick access to constants such as pi and e
In addition, high-end scientific calculators will include:
hexadecimal, binary, and octal calculations, including basic Boolean math
complex numbers
fractions
[1]
MINOR PROJECT
statistics and probability calculations
programmability — see Programmable calculator
equation solving
calculus
conversion of units
physical constants
While most scientific models have traditionally used a single-line display similar to
traditional pocket calculators, many of them have at the very least more digits (10 to 12),
sometimes with extra digits for the floating point exponent.
Uses
A scientific calculator is used for performing advanced mathematical functions beyond
simple arithmetic. It is commonly used in fields such as mathematics, engineering, physics,
and chemistry. Here's a breakdown of its uses:
Addition, subtraction, multiplication, division
Square roots and cube roots
Powers and exponents (e.g., , )
Fractions and percentages
Scientific function
Advanced mathematical operation
History of Scientific Calculator
The scientific calculator has a rich history tied to the development of computing and
mathematical tools. Here's a concise timeline highlighting its
key milestones:
Before electronic calculators, scientists used slide rules for complex calculations.
The idea of an electronic calculator that could handle scientific functions began in the early
1960s. Hewlett-Packard (HP-35) Released in 1972, it was the first handheld scientific
calculator. Could perform trigonometric, exponential, and logarithmic functions. Designed
primarily for engineers and scientists. Priced at around $395 (over $2,000 today adjusted for
inflation). Replaced the slide rule, quickly becoming essential in technical fields. Scientific
calculators became more powerful and more affordable. Texas Instruments (TI), Casio, and
Sharp joined the market.
Features expanded:
Memory functions
Programming capabilities (e.g., TI-59 in 1977)
LCD displays
Real Life Applications
[2]
MINOR PROJECT
Scientific calculators are not just tools for classrooms—they are widely used in various
real-world situations where complex and precise calculations are necessary. Below are some
key areas where they are applied:
School and Colleges
Engineering Fields
Architecture and Design
Science Labs
Finance and economics
Encouraging More Students
Scientific calculators are powerful tools that can enhance mathematical learning
and problem-solving skills. However, many students hesitate to use them due to lack of
familiarity or fear of complexity. Here are some ways to attract more students to start using
scientific calculators confidently and effect
[3]
MINOR PROJECT
TECHNOLOGY USED
Software
Desktop Application
Programming Language: Python
GUI Library: Tkinter
Compiler/IDE: PyCharm
Packaging Tool (for .exe): PyInstaller
Optional Libraries
[4]
MINOR PROJECT
math (for basic operations)
sympy (for symbolic math, algebra)
numpy (for advanced scientific calculations)
Hardware
Details Specification of this monitor used for creating this Scientific Calculator.
Device Specifications
Victus by HP Gaming Laptop 15-fa1xxx
Device name: HP
Processor: 12th Gen Intel(R) Core(TM) i5-12450H 2.00GHz
Installed RAM: 8.00 GB (7.65 GB usable)
Device ID: F2095A4A-D69D-4DCE-B222-775FB78EF9A6
Product ID: 00356-24748-26586-AAOEM
System type: 64-bit operating system, x64-based processor
Pen and touch: No pen or touch input is available for this
Display
Windows Specifications
Edition: Windows 11 Home Single Language
Version: 24H2
Installed on: 12-01-2025
OS build: 26100.4061
Experience: Windows Feature Experience Pack
1000.26100.84.0
[5]
MINOR PROJECT
design
Flow Diagram of Scientific Calculator :
START
T
Import Modules
(tkinter,math,os,sys)
[6]
MINOR PROJECT
Define
resource_path()
Setup Main Window (root)
Title,Icon,Geometry
Menu Bar
Define Math Functions
fsin,fcos,ftan
arcsin,arccos,arctan
Event Handlers in Class Event Handlers in Class
Initializes all widgets and btn_click() – updates
buttons btn_equal() – evaluates
Uses grid layout btn_clear() / btn_clear_all(),
Screen: Entry widget convert_deg/red – sets
Buttons: Digits,ops,scientific, answer() – recalls last result
functions
Menu Commands
Mainloop() Standard/Scientific
(Event loop starts here)
iExit() - confirmation
[7]
MINOR PROJECT
coding
import tkinter as tk
import math
from math import *
import tkinter.messagebox
import sys
import os
def resource_path(relative_path):
[8]
MINOR PROJECT
try:
# PyInstaller temporary folder path
base_path = sys._MEIPASS
except Exception:
# Normal dev path
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
root =tk.Tk()
root.title("Smart Scientific Calculator")
icon_path = resource_path("1.ico")
root.wm_iconbitmap(icon_path)
root.geometry("480x584+0+0")
root.resizable(False, False)
calc = tk.Frame(root)
calc.grid()
convert_constant = 1
inverse_convert_constant = 1
def fsin(arg):
return sin(arg * convert_constant)
def fcos(arg):
return cos(arg * convert_constant)
def ftan(arg):
return tan(arg * convert_constant)
def arcsin(arg):
return inverse_convert_constant * (asin(arg))
def arccos(arg):
return inverse_convert_constant * (acos(arg))
def arctan(arg):
return inverse_convert_constant * (atan(arg))
class Calc():
def __init__(self,master):
self.expression = ""
self.recall = ""
[9]
MINOR PROJECT
self.sum_up = ""
self.text_input = tk.StringVar()
self.master = master
self.result=False
Screen = tk.Entry(calc, font=('Helvetica', 20, 'bold'),
textvariable=self.text_input,
bg="azure", bd=30, width=28, justify="right")
Screen.grid(row=0, column=0, columnspan=4, pady=1, padx=1)
Screen.insert(0, "0")
#================Row 0=================================#
self.btn_7=tk.Button(calc,text="7",width=6,height=2,
font=('Helvetica',20,'bold'),
bd=4,bg="lavender",command=lambda:
self.btn_click(7)).grid(row=2,column=0,pady=1)
self.btn_8=tk.Button(calc, text="8", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(8)).grid(row=2,
column=1, pady=1,padx=2)
self.btn_9=tk.Button(calc, text="9", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(9)).grid(row=2,
column=2, pady=1,padx=2)
self.btn_Mul=tk.Button(calc, text="x", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("*")).grid(row=2, column=3, pady=1,padx=2)
self.btn_left_bracket=tk.Button(calc, text="\u0028", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda: self.btn_click("(")).grid(row=2,
column=4, pady=1,padx=2)
self.btn_right_bracket=tk.Button(calc, text="\u0029", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda: self.btn_click(")")).grid(row=2,
column=5, pady=1,padx=2)
self.btn_Mod=tk.Button(calc, text="\u0025", width=6, height=2,
font=('Helvetica', 20, 'bold'),
[10]
MINOR PROJECT
bd=4, bg="turquoise",command=lambda:
self.btn_click("%")).grid(row=2, column=6, pady=1,padx=2)
self.btn_Sqrt=tk.Button(calc, text="√", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("sqrt(")).grid(row=2, column=7, pady=1,padx=2)
#============================Row 1=====================#
self.btn_4 = tk.Button(calc, text="4", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(4)).grid(row=3,
column=0, pady=1)
self.btn_5 = tk.Button(calc, text="5", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(5)).grid(row=3,
column=1, pady=1, padx=2)
self.btn_6 = tk.Button(calc, text="6", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(6)).grid(row=3,
column=2, pady=1, padx=2)
self.btn_Div = tk.Button(calc, text="\u00F7", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda: self.btn_click("/")).grid(row=3,
column=3, pady=1, padx=2)
self.btn_Power_n = tk.Button(calc, text="x"+"\u207F", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("**")).grid(row=3, column=4, pady=1, padx=2)
self.btn_Fact = tk.Button(calc, text="n!", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("factorial(")).grid(row=3, column=5, pady=1, padx=2)
self.btn_Deg = tk.Button(calc,text="Deg", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=self.convert_deg).grid(row=3,
column=6, pady=1, padx=2)
[11]
MINOR PROJECT
self.btn_Rad = tk.Button(calc, text="Rad",width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=self.convert_rad).grid(row=3,
column=7, pady=1, padx=2)
#===============================Row 2==================#
self.btn_1 = tk.Button(calc, text="1", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(1)).grid(row=4,
column=0, pady=1)
self.btn_2 = tk.Button(calc, text="2", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(2)).grid(row=4,
column=1, pady=1, padx=2)
self.btn_3 = tk.Button(calc, text="3", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(3)).grid(row=4,
column=2, pady=1, padx=2)
self.btn_Add = tk.Button(calc, text="\u002B", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("+")).grid(row=4, column=3, pady=1, padx=2)
self.btn_Pi = tk.Button(calc, text="\u03C0", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click('pi')).grid(row=4, column=4, pady=1, padx=2)
self.btn_Ln = tk.Button(calc, text="\u33D1", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("log(")).grid(row=4, column=5, pady=1, padx=2)
self.btn_log = tk.Button(calc, text="log", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
self.btn_click("log10(")).grid(row=4, column=6, pady=1, padx=2)
self.btn_x_square = tk.Button(calc, text=u"x\u00B2", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda:
[12]
MINOR PROJECT
self.btn_click("**2")).grid(row=4, column=7, pady=1, padx=2)
#==================================Row 3===============#
self.btn_Clear = tk.Button(calc, text=chr(68)+chr(69)+chr(76), width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=self.btn_clear).grid(row=5, column=0,
pady=1)
self.btn_0 = tk.Button(calc, text="0", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda: self.btn_click(0)).grid(row=5,
column=1, pady=1, padx=2)
self.btn_All_Clear = tk.Button(calc, text=chr(65)+chr(67), width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=self.btn_clear_all).grid(row=5,
column=2, pady=1, padx=2)
self.btn_Sub = tk.Button(calc, text="\u002D", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda: self.btn_click("-
")).grid(row=5, column=3, pady=1, padx=2)
self.btn_Sin = tk.Button(calc, text="sin", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda:
self.btn_click("fsin(")).grid(row=5, column=5, pady=1, padx=2)
self.btn_Cos = tk.Button(calc, text="cos", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda:
self.btn_click("fcos(")).grid(row=5, column=6, pady=1, padx=2)
self.btn_Tan = tk.Button(calc, text="tan", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=lambda:
self.btn_click("ftan(")).grid(row=5, column=7, pady=1, padx=2)
self.btn_change_sign= tk.Button(calc, text="+/-", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=self.change_sign).grid(row=5,
column=4, pady=1, padx=2)
#=================================Row 4================#
self.btn_Dot = tk.Button(calc, text="\u002E", width=6, height=2,
[13]
MINOR PROJECT
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=lambda: self.btn_click(".")).grid(row=6,
column=0, pady=1)
self.btn_Power_2 = tk.Button(calc, text="10"+"\u207F", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4,
bg="turquoise",command=lambda:self.btn_click("10**")).grid(row=6, column=1, pady=1,
padx=2)
self.btn_Ans = tk.Button(calc, text=chr(65)+chr(110)+chr(115), width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="turquoise",command=self.answer).grid(row=6, column=2,
pady=1, padx=2)
self.btn_Equal = tk.Button(calc, text="\u003D", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg='turquoise',command=self.btn_equal).grid(row=6, column=3,
pady=1, padx=2)
super_s="⁻¹"
self.btn_Sin_Inverse = tk.Button(calc, text="sin"+super_s, width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4,
bg="lavender",command=lambda:self.btn_click("arcsin(")).grid(row=6, column=4, pady=1,
padx=2)
self.btn_Cos_Inverse = tk.Button(calc, text="cos"+super_s, width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4,
bg="lavender",command=lambda:self.btn_click("arccos(")).grid(row=6, column=5, pady=1,
padx=2)
self.btn_Tan_Inverse = tk.Button(calc, text="tan"+super_s, width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4,
bg="lavender",command=lambda:self.btn_click("arctan(")).grid(row=6, column=6, pady=1,
padx=2)
self.btn_e = tk.Button(calc, text="e", width=6, height=2,
font=('Helvetica', 20, 'bold'),
bd=4, bg="lavender",command=self.e).grid(row=6, column=7, pady=1,
padx=2)
#======================================================#
[14]
MINOR PROJECT
def btn_click(self, expression_val):
self.result=False
self.expression = self.expression + str(expression_val)
self.text_input.set(self.expression)
def pi(self):
self.result=False
self.expression=str(math.pi)
self.text_input.set(self.expression)
def e(self):
self.result=False
self.expression=str(math.e)
self.text_input.set(self.expression)
def change_sign(self):
self.result=False
self.expression=self.expression + '-'
self.text_input.set(self.expression)
def answer(self):
self.answer=self.sum_up
self.expression=self.expression + self.answer
self.text_input.set(self.expression)
def convert_deg(self):
global convert_constant
global inverse_convert_constant
convert_constant = pi / 180
inverse_convert_constant = 180 / pi
def convert_rad(self):
global convert_constant
global inverse_convert_constant
convert_constant = 1
inverse_convert_constant = 1
def btn_clear(self):
self.result=False
self.expression=self.expression[:-1]
self.text_input.set(self.expression)
def btn_clear_all(self):
[15]
MINOR PROJECT
self.expression = ""
self.text_input.set("")
def btn_equal(self):
self.result=True
self.sum_up = str(eval(self.expression))
self.text_input.set(self.sum_up)
self.expression = self.sum_up
lblDisplay = tk.Label(calc, text="Smart Calculator",
font=('Helvetica',35,'bold'),
#bg='black',
fg='black', justify='center')
lblDisplay.grid(row=0, column=4, columnspan=4)
#=================================Menu================#
def iExit():
iExit = tkinter.messagebox.askyesno("Smart Scientific Calculator",
"Confirm if you want to exit ?")
if iExit > 0:
root.destroy()
return
def Scientific():
root.resizable(width=False, height=False)
root.geometry("960x565+0+0")
def Standard():
root.resizable(width=False, height=False)
root.geometry("480x565+0+0")
menubar = tk.Menu(calc)
filemenu = tk.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)
root.config(menu=menubar)
b = Calc(root)
root.mainloop()
[16]
MINOR PROJECT
OUTPUT
[17]
MINOR PROJECT
Standard:
[18]
MINOR PROJECT
Addition :
[19]
MINOR PROJECT
Subtraction :
Multiplication :
[20]
MINOR PROJECT
Division :
[21]
MINOR PROJECT
Scientific :
Modulus :
[22]
MINOR PROJECT
Square root :
[23]
MINOR PROJECT
To the power :
[24]
MINOR PROJECT
Factorial :
[25]
MINOR PROJECT
Pi :
[26]
MINOR PROJECT
[27]
MINOR PROJECT
Log :
[28]
MINOR PROJECT
Sin :
Degree value :
[29]
MINOR PROJECT
Radian value :
Cos :
[30]
MINOR PROJECT
Degree value :
Radian value :
[31]
MINOR PROJECT
Sin inverse :
[32]
MINOR PROJECT
Cos inverse :
[33]
MINOR PROJECT
Tan inverse :
[34]
MINOR PROJECT
e:
Exit :
[35]
MINOR PROJECT
[36]
MINOR PROJECT
CONCLUSION
This minor project on the scientific calculator successfully demonstrates
the integration of mathematical logic with programming to create a functional and user-
friendly tool. By incorporating advanced operations such as trigonometric, logarithmic, and
exponential functions, the project goes beyond basic arithmetic and showcases the
capabilities of scientific computing in a compact application.
Throughout the development process, we gained practical experience in designing
user interfaces, handling errors, and implementing core functionalities. This project not only
strengthened our understanding of programming concepts but also improved our problem-
solving and debugging skills.
In conclusion, the scientific calculator minor project has been an excellent learning
experience and serves as a solid foundation for future projects involving GUI development.
In Near future we are planning to develop this project further and add some more cool
features into it. Like file, video, photos, etc hide in calculator. Add the feature copy and
paste.
BIBLIOgraphy
https://youtu.be/glN87rNH0L8?si=vFRFzDtm__9uYSfH (on 25th April , 2025 at 1
AM)
https://youtu.be/1zfYZ1N4JEc?si=HZH5LubATQCw_DfY (on 27th April , 2025 at 12
AM)
https://youtu.be/E2yLX2qLG3c?si=StlBwdFSLceN24kf (on 1th May , 2025 at 9 PM)
[37]