0% found this document useful (0 votes)
34 views30 pages

Priya Saini

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)
34 views30 pages

Priya Saini

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/ 30

DECLERATION

I PRIYA SAINI, a student of Master of Computer Science, 3rd Semester in the


Department of Computer Science, Govt. College, Hisar under College Roll No.
222043176004, Session 2022-2024, hereby declare that the project entitled "
SCIENTIFIC CALCULATOR " has been completed by me at "INTERNSHALA"
after the theory examination of 2nd Semester.

I hereby further declare that:

1. The matter embodied in this project work has not been submitted earlier for
award of any degree or diploma Moreover, the project does not breach any
existing copyright or third-party rights.

2. If any plagiarism is found in this project report in any way, then I shall be solely
responsible for the same. The project contains no such material that may be
illegal and offensive.

Date: 23TH NOVEMBER 2023 PRIYA SAINI

i
CERTIFICATE

It is certified that Mr. PRIYA SAINI is a bonafide student of class Master of Computer
Science - 3rd Semester, under University Roll No. 223112720004 He has undertaken the
internship entitled '' PYHTON PROGRAMING '' and has completed project entitled "
SCIENTIFIC CALCULATOR "At " INTERNSHALA" under the supervision of Ms.
Poonam Narwal.

I wish him all success in his all endeavors.

DR. SUDESH

ii
Abstract
A Scientific Calculator is a type of electronic calculator, usually but not always handheld,
designed to calculate problems in science, engineering, and mathematics. They have completely
replaced slide rules in traditional applications, and are widely used in both education and
professional. The python calculator was implemented using tkinter to make the calculation of
mathematical functions easier. The application consists of scientific and standard functions. The
standard is used to solve scientific notation type math functions like sin, cos, tan, log etc.

iii
ACKNOWLEDGEMENT

First of all, I would like to express my sincere gratitude to the company that helped me
to do the internship, "INTERNSHALA", for their support, availability and insightful
comments, and for steering me to the right direction whenever I needed it. I also would
like to thank all the people who helped me complete this Internship training with their
patience and openness and the enjoyable learning environment they created.

It is indeed with a great sense of pleasure and immense sense of gratitude that I
acknowledge the help of these individuals. I would like to thank my Mentor of the
Department DR. SUDESH, for his constructive criticism throughout my internship.

I would also like to thank MR. PRIYA and other employees of INTERNSHALA for
their support and advices to complete internship in above said organization.

I am extremely grateful to my department staff members, friends and my family who


helped me in successful completion of this internship.

I would like to thank all those who I had the pleasure to learn with for making this
demanding time joyful yet efficient, and for taking the time to answer any of my
questions.

Finally, I must express my very profound gratitude to my parents for providing me with
unfailing support and continuous encouragement throughout my years of study leading
to this very moment.

PRIYA SAINI

iv
INTERNSHIP CERTIFICATE

v
ABOUT THE ORGANISATION

Internshala is a dot com business with the heart of dot org.

We are a technology company on a mission to equip students with relevant skills & practical
exposure to help them get the best possible start to their careers. Imagine a world full of freedom
and possibilities. A world where you can discover your passion and turn it into your career. A
world where you graduate fully assured, confident, and prepared to stake a claim on your place
in the world.

Products & Services

Internshala offers following products & services to its users:-

1. Internship and job posting: Organization & individuals looking to hire interns and/or
full-time employees can post their internship and/or job requirement on Internshala.
Currently, one internship/job can be posted for free in a month, following which one may
opt for our premium services (pay-per-listing/other premium plans) to post further
jobs/internships. Visit Internshala Employer Section to know more.

2. Internship and job search: Internship and job seekers from all over India can search and
apply for internships and jobs relevant to their coursework and interest free of cost. Visit
Internshala Student Section to know more.

3. Internshala Trainings: Internshala offers a variety of online training programs across


multiple disciplines (Machine Learning, Web Development, Digital Marketing, Java,
French and several others) which students can do from the comfort of their homes and
learn the skills needed in today’s industry. Visit Internshala Trainings to know more.

vi
Table of Contents

Declaration i
Certificate ii
Abstract iii
Acknowledgments iv
Internship Certificate v
About the Organization vi
Chapter 1: Python 01-02
Chapter 2: Tkinter Programming 03-06
Chapter 3: Visual Studio Code 07
Chapter 4: Source Code 08-20
Chapter 5: Output 21
Chapter 6: Conclusion 22
Chapter 7: Bibliography 23
Chapter 8: References 24

vii
CHAPTER 1
PYTHON

Python is a high-level, interpreted, interactive and object-oriented


scripting language. Python is designed to be highly readable. It uses
English keywords frequently where as other languages use punctuation,
and it has fewer syntactical constructions than other languages.
• Python is Interpreted − Python is processed at runtime by the
interpreter. You do not need to compile your program before
executing it. This is similar to PERL and PHP.
• Python is Interactive − You can actually sit at a Python prompt and
interact with the interpreter directly to write your programs.
• Python is Object-Oriented − Python supports Object-Oriented
style or technique of programming that encapsulates code within
objects.
• Python is a Beginner's Language − Python is a great language
for the beginner-level programmers and supports the development
of a wide range of applications from simple text processing to WWW
browsers to games.

History of Python

Python was developed by Guido van Rossum in the late eighties and
early nineties at the National Research Institute for Mathematics and
Computer Science in the Netherlands.
Python is derived from many other languages, including ABC, Modula-3,
C, C++, Algol-68, SmallTalk, and Unix shell and other scripting
languages.
Python is copyrighted. Like Perl, Python source code is now available
under the GNU General Public License (GPL).
Python is now maintained by a core development team at the institute,
although Guido van Rossum still holds a vital role in directing its progress.

Python Features

Python's features include −

1
• Easy-to-learn − Python has few keywords, simple structure, and a
clearly defined syntax. This allows the student to pick up the
language quickly.
• Easy-to-read − Python code is more clearly defined and visible to
the eyes.
• Easy-to-maintain − Python's source code is fairly easy-to-
maintain.
• A broad standard library − Python's bulk of the library is very
portable and cross-platform compatible on UNIX, Windows, and
Macintosh.
• Interactive Mode − Python has support for an interactive mode
which allows interactive testing and debugging of snippets of code.
• Portable − Python can run on a wide variety of hardware platforms
and has the same interface on all platforms.
• Extendable − You can add low-level modules to the Python
interpreter. These modules enable programmers to add to or
customize their tools to be more efficient.
• Databases − Python provides interfaces to all major commercial
databases.
• GUI Programming − Python supports GUI applications that can be
created and ported to many system calls, libraries and windows
systems, such as Windows MFC, Macintosh, and the X Window
system of Unix.
• Scalable − Python provides a better structure and support for large
programs than shell scripting.
Apart from the above-mentioned features, Python has a big list of good
features, few are listed below −
• It supports functional and structured programming methods as well as OOP.
• It can be used as a scripting language or can be compiled to byte- code for
building large applications.
• It provides very high-level dynamic data types and supports dynamic type
checking.
• It supports automatic garbage collection.
• It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.

2
CHAPTER 2
TKINTER PROGRAMMING

Tkinter is the standard GUI library for Python. Python when combined with Tkinter
provides a fast and easy way to create GUI applications. Tkinter provides a powerful
object-oriented interface to the Tk GUI toolkit.
Creating a GUI application using Tkinter is an easy task. All you need to do is perform
the following steps −
• Import the Tkinter module.
• Create the GUI application main window.
• Add one or more of the above-mentioned widgets to the GUI application.
• Enter the main event loop to take action against each event triggered by the
user.

Example
#!/usr/bin/python
import Tkinter top
= Tkinter.Tk()
# Code to add widgets will go here... top.mainloop()
This would create a following window −

Tkinter Widgets
Tkinter provides various controls, such as buttons, labels and text boxes used in a
GUI application. These controls are commonly called widgets.
There are currently 15 types of widgets in Tkinter. We present these widgets as well
as a brief description in the following table −

3
Sr.No. Operator & Description

1 Button

The Button widget is used to display buttons in your application.

2
Canvas
The Canvas widget is used to draw shapes, such as lines, ovals, polygons and
rectangles, in your application.

3 Checkbutton
The Checkbutton widget is used to display a number of options as checkboxes.
The user can select multiple options at a time.

4 Entry
The Entry widget is used to display a single-line text field for accepting values from
a user.

5
Frame
The Frame widget is used as a container widget to organize other widgets.

6 Label
The Label widget is used to provide a single-line caption for other widgets. It can
also contain images.

7 Listbox
The Listbox widget is used to provide a list of options to a user.

8
Menubutton
The Menubutton widget is used to display menus in your application.

9 Menu
The Menu widget is used to provide various commands to a user. These commands
are contained inside Menubutton.

4
10 Message
The Message widget is used to display multiline text fields for accepting values from
a user.

11 Radiobutton
The Radiobutton widget is used to display a number of options as radio buttons.
The user can select only one option at a time.

12
Scale
The Scale widget is used to provide a slider widget.

13 Scrollbar
The Scrollbar widget is used to add scrolling capability to various widgets, such as
list boxes.

14
Text
The Text widget is used to display text in multiple lines.

15
Toplevel
The Toplevel widget is used to provide a separate window container.

16 Spinbox
The Spinbox widget is a variant of the standard Tkinter Entry widget, which can be
used to select from a fixed number of values.

17
PanedWindow
A PanedWindow is a container widget that may contain any number of panes,
arranged horizontally or vertically.

18 LabelFrame
A labelframe is a simple container widget. Its primary purpose is to act as a spacer
or container for complex window layouts.

5
19 tkMessageBox
This module is used to display message boxes in your applications.

6
CHAPTER 3
VISUAL STUDIO CODE

Visual Studio Code is a free source code editor, made by Microsoft for
Windows, Linux and macOS. Features include support for debugging,
syntax highlighting, intelligent code
completion, snippets, code refactoring, and embedded Git. Users can
change the theme, keyboard shortcuts, preferences, and install
extensions that add additional functionality. The python extension in
Visual Studio Code makes it an excellent video editor.

Fig 3.1: Visual Studio Code Platform

7
CHAPTER 4
SOURCE CODE

The code for the, Scientific Calculator is as follows:

8
def btn5_clicked():
if disp.get() == '0':
disp.delete(0, END)
pos = len(disp.get())
disp.insert(pos, '5')

def btn6_clicked():
if disp.get() == '0':
disp.delete(0, END)
pos = len(disp.get())
disp.insert(pos, '6')

def btn7_clicked():
if disp.get() == '0':
disp.delete(0, END)
pos = len(disp.get())
disp.insert(pos, '7')

def btn8_clicked():
if disp.get() == '0':
disp.delete(0, END)
pos = len(disp.get())
disp.insert(pos, '8')

def btn9_clicked():
if disp.get() == '0':
disp.delete(0, END)
pos = len(disp.get())
disp.insert(pos, '9')

def btn0_clicked():
if disp.get() == '0':
disp.delete(0, END)
pos = len(disp.get())
disp.insert(pos, '0')

def key_event(*args):
if disp.get() == '0':
disp.delete(0, END)

def btnp_clicked():

9
pos = len(disp.get()) disp.insert(pos,
'+')

def btnm_clicked():
pos = len(disp.get()) disp.insert(pos,
'-')

def btnml_clicked(): pos


= len(disp.get())
disp.insert(pos, '*')

def btnd_clicked():
pos = len(disp.get()) disp.insert(pos,
'/')

def btnc_clicked(*args):
disp.delete(0, END)
disp.insert(0, '0')

def sin_clicked():
try:
ans = float(disp.get())
if switch is True:
ans = math.sin(math.radians(ans))
else:
ans = math.sin(ans)
disp.delete(0, END) disp.insert(0,
str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
ope
rators")

def cos_clicked():
try:
ans = float(disp.get())
if switch is True:
ans = math.cos(math.radians(ans))
else:
ans = math.cos(ans)
disp.delete(0, END) disp.insert(0,
str(ans))
except Exception:

10
tkinter.messagebox.showerror("Value Error", "Check your values and
ope
rators")

def tan_clicked():

try:
ans = float(disp.get())

if switch is True:
ans = math.tan(math.radians(ans))
else:

ans = math.tan(ans)
disp.delete(0, END) disp.insert(0,
str(ans))

except Exception:

tkinter.messagebox.showerror("Value Error", "Check your values and


operators")

def arcsin_clicked():
try:
ans = float(disp.get())
if switch is True:
ans = math.degrees(math.asin(ans))
else:
ans = math.asin(ans)
disp.delete(0, END) disp.insert(0,
str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
operators")
def arccos_clicked():
try:
ans = float(disp.get())
if switch is True:
ans = math.degrees(math.acos(ans))
else:
ans = math.acos(ans)
disp.delete(0, END) disp.insert(0,
str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
ope

11
rators")

def arctan_clicked():

try:
ans = float(disp.get())

12
if switch is True:
ans = math.degrees(math.atan(ans))
else:
ans = math.atan(ans)
disp.delete(0, END) disp.insert(0,
str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
ope
rators")

def pow_clicked():
pos = len(disp.get()) disp.insert(pos,
'**')

def round_clicked():
try:
ans = float(disp.get())
ans = round(ans)
disp.delete(0, END)
disp.insert(0, str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
ope
rators")

def logarithm_clicked():
try:
ans = float(disp.get())
ans = math.log10(ans)
disp.delete(0, END)
disp.insert(0, str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
ope
rators")

def fact_clicked():
try:
ans = float(disp.get())
ans = math.factorial(ans)
disp.delete(0, END)
disp.insert(0, str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and
operators")

13
def sqr_clicked():
try:
ans = float(disp.get())
ans = math.sqrt(ans)
disp.delete(0, END)
disp.insert(0, str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and ope
rators")

def dot_clicked():
pos = len(disp.get()) disp.insert(pos,
'.')

def pi_clicked():
if disp.get() == '0': disp.delete(0,
END)
pos = len(disp.get()) disp.insert(pos,
str(math.pi))

def e_clicked():
if disp.get() == '0': disp.delete(0,
END)
pos = len(disp.get()) disp.insert(pos,
str(math.e))

def bl_clicked():
pos = len(disp.get()) disp.insert(pos,
'(')

def br_clicked():
pos = len(disp.get()) disp.insert(pos,
')')

def del_clicked():
pos = len(disp.get())
display = str(disp.get())
if display == '':
disp.insert(0, '0')
elif display == ' ':
disp.insert(0, '0')
elif display == '0':
pass

14
else:
disp.delete(0, END) disp.insert(0,
display[0:pos-1])

def conv_clicked():
global switch if
switch is None:
switch = True conv_btn['text']
= "Deg"
else:
switch = None conv_btn['text']
= "Rad"

def ln_clicked():
try:
ans = float(disp.get())
ans = math.log(ans)
disp.delete(0, END)
disp.insert(0, str(ans))
except Exception:
tkinter.messagebox.showerror("Value Error", "Check your values and ope
rators")

def mod_clicked():
pos = len(disp.get()) disp.insert(pos,
'%')

def btneq_clicked(*args):
try:
ans = disp.get()
ans = eval(ans)
disp.delete(0, END)
disp.insert(0, ans)

except: tkinter.messagebox.showerror("Value Error", "Check your values


and ope
rators")

# Label data =

StringVar()

disp = Entry(root, font="Verdana 20", fg="black", bg="mistyrose", bd=0,


justif y=RIGHT, insertbackground="#abbab1", cursor="arrow")

15
disp.bind("<Return>",
btneq_clicked)
disp.bind("<Escape>", btnc_clicked)
disp.bind("<Key-1>", key_event)
disp.bind("<Key-2>", key_event)
disp.bind("<Key-3>", key_event)
disp.bind("<Key-4>", key_event)
disp.bind("<Key-5>", key_event)
disp.bind("<Key-6>", key_event)
disp.bind("<Key-7>", key_event)
disp.bind("<Key-8>", key_event)
disp.bind("<Key-9>", key_event)
disp.bind("<Key-0>", key_event)
disp.bind("<Key-.>", key_event)
disp.insert(0, '0')
disp.focus_set()
disp.pack(expand=TRUE, fill=BOTH)

# Row 1 Buttons

btnrow1 = Frame(root, bg="#000000") btnrow1.pack(expand=TRUE,


fill=BOTH)

pi_btn = Button(btnrow1, text="π", font="Segoe 18", relief=GROOVE, bd=0, comma


nd=pi_clicked, fg="white", bg="#333333") pi_btn.pack(side=LEFT, expand=TRUE,
fill=BOTH)

fact_btn = Button(btnrow1, text=" x! ", font="Segoe 18", relief=GROOVE,


bd=0, command=fact_clicked, fg="white", bg="#333333")
fact_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

sin_btn = Button(btnrow1, text="sin", font="Segoe 18", relief=GROOVE, bd=0, co


mmand=sin_clicked, fg="white", bg="#333333") sin_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

cos_btn = Button(btnrow1, text="cos", font="Segoe 18", relief=GROOVE, bd=0, co


mmand=cos_clicked, fg="white", bg="#333333") cos_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

tan_btn = Button(btnrow1, text="tan", font="Segoe 18", relief=GROOVE, bd=0, co


mmand=tan_clicked, fg="white", bg="#333333") tan_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn1 = Button(btnrow1, text="1", font="Segoe 23", relief=GROOVE, bd=0, command


=btn1_clicked, fg="white", bg="#333333") btn1.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn2 = Button(btnrow1, text="2", font="Segoe 23", relief=GROOVE, bd=0, comman


d=btn2_clicked, fg="white", bg="#333333")

16
btn2.pack(side=LEFT, expand=TRUE, fill=BOTH)

btn3 = Button(btnrow1, text="3", font="Segoe 23", relief=GROOVE, bd=0, command


=btn3_clicked, fg="white", bg="#333333") btn3.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btnp = Button(btnrow1, text="+", font="Segoe 23", relief=GROOVE, bd=0, command


=btnp_clicked, fg="white", bg="#333333") btnp.pack(side=LEFT,
expand=TRUE, fill=BOTH)

# Row 2 Buttons

btnrow2 = Frame(root) btnrow2.pack(expand=TRUE,


fill=BOTH)

e_btn = Button(btnrow2, text="e", font="Segoe 18", relief=GROOVE, bd=0, comman


d=e_clicked, fg="white", bg="#333333") e_btn.pack(side=LEFT, expand=TRUE,
fill=BOTH)

sqr_btn = Button(btnrow2, text=" √x ", font="Segoe 18", relief=GROOVE, bd=0, c


ommand=sqr_clicked, fg="white", bg="#333333") sqr_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

sinh_btn = Button(btnrow2, text="sin−1", font="Segoe 11 bold", relief=GROOVE,


bd=0, command=arcsin_clicked, fg="white", bg="#333333")
sinh_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

cosh_btn = Button(btnrow2, text="cos-


1", font="Segoe 11 bold", relief=GROOVE, bd=0, command=arccos_clicked,
fg="whi te", bg="#333333") cosh_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

tanh_btn = Button(btnrow2, text="tan-


1", font="Segoe 11 bold", relief=GROOVE, bd=0, command=arctan_clicked,
fg="whi te", bg="#333333") tanh_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

btn4 = Button(btnrow2, text="4", font="Segoe 23", relief=GROOVE, bd=0, command


=btn4_clicked, fg="white", bg="#333333") btn4.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn5 = Button(btnrow2, text="5", font="Segoe 23", relief=GROOVE, bd=0, command


=btn5_clicked, fg="white", bg="#333333") btn5.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn6 = Button(btnrow2, text="6", font="Segoe 23", relief=GROOVE, bd=0, command


=btn6_clicked, fg="white", bg="#333333") btn6.pack(side=LEFT,
expand=TRUE, fill=BOTH)

17
btnm = Button(btnrow2, text="-
", font="Segoe 23", relief=GROOVE, bd=0, command=btnm_clicked, fg="white", bg=
"#333333") btnm.pack(side=LEFT,
expand=TRUE, fill=BOTH)

# Row 3 Buttons

btnrow3 = Frame(root) btnrow3.pack(expand=TRUE,


fill=BOTH)

conv_btn = Button(btnrow3, text="Rad", font="Segoe 12 bold", relief=GROOVE, bd


=0, command=conv_clicked, fg="white", bg="#333333")
conv_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

round_btn = Button(btnrow3, text="round", font="Segoe 10 bold",


relief=GROOVE, bd=0, command=round_clicked, fg="white", bg="#333333")
round_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

ln_btn = Button(btnrow3, text="ln", font="Segoe 18", relief=GROOVE, bd=0, comm


and=ln_clicked, fg="white", bg="#333333") ln_btn.pack(side=LEFT, expand=TRUE,
fill=BOTH)

logarithm_btn = Button(btnrow3, text="log", font="Segoe 17", relief=GROOVE, bd


=0, command=logarithm_clicked, fg="white", bg="#333333")
logarithm_btn.pack(side=LEFT, expand=TRUE, fill=BOTH)

pow_btn = Button(btnrow3, text="x^y", font="Segoe 17", relief=GROOVE, bd=0, co


mmand=pow_clicked, fg="white", bg="#333333") pow_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn7 = Button(btnrow3, text="7", font="Segoe 23", relief=GROOVE, bd=0, command


=btn7_clicked, fg="white", bg="#333333") btn7.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn8 = Button(btnrow3, text="8", font="Segoe 23", relief=GROOVE, bd=0, command


=btn8_clicked, fg="white", bg="#333333") btn8.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn9 = Button(btnrow3, text="9", font="Segoe 23", relief=GROOVE, bd=0, command


=btn9_clicked, fg="white", bg="#333333") btn9.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btnml = Button(btnrow3, text="*", font="Segoe 23", relief=GROOVE, bd=0, comman


d=btnml_clicked, fg="white", bg="#333333") btnml.pack(side=LEFT, expand=TRUE,
fill=BOTH)

# Row 4 Buttons

18
btnrow4 = Frame(root) btnrow4.pack(expand=TRUE,
fill=BOTH)

mod_btn = Button(btnrow4, text="%", font="Segoe 21", relief=GROOVE, bd=0, comm


and=mod_clicked, fg="white", bg="#333333") mod_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

bl_btn = Button(btnrow4, text=" ( ", font="Segoe 21", relief=GROOVE, bd=0, com


mand=bl_clicked, fg="white", bg="#333333") bl_btn.pack(side=LEFT, expand=TRUE,
fill=BOTH)

br_btn = Button(btnrow4, text=" ) ", font="Segoe 21", relief=GROOVE, bd=0, com


mand=br_clicked, fg="white", bg="#333333") br_btn.pack(side=LEFT, expand=TRUE,
fill=BOTH)

dot_btn = Button(btnrow4, text=" • ", font="Segoe 21", relief=GROOVE, bd=0, co


mmand=dot_clicked, fg="white", bg="#333333") dot_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btnc = Button(btnrow4, text="C", font="Segoe 23", relief=GROOVE, bd=0, command


=btnc_clicked, fg="white", bg="#333333") btnc.pack(side=LEFT,
expand=TRUE, fill=BOTH)

del_btn = Button(btnrow4, text="⌫", font="Segoe 20", relief=GROOVE, bd=0, comm


and=del_clicked, fg="white", bg="#333333") del_btn.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btn0 = Button(btnrow4, text="0", font="Segoe 23", relief=GROOVE, bd=0, command


=btn0_clicked, fg="white", bg="#333333") btn0.pack(side=LEFT,
expand=TRUE, fill=BOTH)

btneq = Button(btnrow4, text="=", font="Segoe 23", relief=GROOVE, bd=0, comman


d=btneq_clicked, fg="white", bg="#333333") btneq.pack(side=LEFT, expand=TRUE,
fill=BOTH)

btnd = Button(btnrow4, text="/", font="Segoe 23", relief=GROOVE, bd=0, command


=btnd_clicked, fg="white", bg="#333333") btnd.pack(side=LEFT,
expand=TRUE, fill=BOTH)
root.mainloop()

19
CHAPTER 5
OUTPUT

Fig 5.1: Running the Python file in the terminal

Fig 5.2: Successful Output (Answer for sin5)

20
CHAPTER 6
CONCLUSION

The proposed system is error free. Trivial concepts of Python language are
implemented into the system. As, the usage of Python Tkinter as the GUI
provided various controls, such as buttons, labels, and text boxes to build
a user friendly application.
The rapid expansion and use of the internet, confirms the splendid future
and scope of the project.

21
CHAPTER 7
BIBLIOGRAPHY

• Trainer Manual

• http://python.org

• http://diveintopython.org

• http://djangoproject.com

• https://www.geeksforgeeks.org/python-programming-language/

• https://www.tutorialspoint.com/python/index.htm

22
CHAPTER 8
REFERENCES

[1] For VS Code Installation

https://code.visualstudio.com/

[2] For TKINTER Programming

https://docs.python.org/3/library/tkinter.html

[3] AI Sweigart - Automate the Boring Stuff with Python, 2nd


Edition: Practical Programming for Total Beginners – 2015.

[4] Python GUI Programming with Tkinter: Develop Responsive


and Powerful GUI Applications with Tkinter – 2018.

[5] Y. Daniel Liang, Introduction to Programing Using Python,


Pearson2013.

[6] Reema Thareja, Python Programing using Problem Solving


Approach, Oxford Publication,2017.

[7] Kenneth A. Lambert, The Fundamentals of Python: First


Programs, Cengage Learning, 2011.

[8] Dr. R. Nageswara Rao, Allen B. Downey, Core Python


Programming, Think Python, O’Reilly Media,2012.

[9] Ashok Namdev Kamthane, Programming and Problem


Solving with Python, Mc Graw Hill Education Publication,2018.

[10] John Guttag, Introduction to Computation and programming


using Python, Springer, Revised and Expanded version
(Referred by MIT),2013.

23

You might also like