Program Name and Code: (CO6I) Academic Year: 2021-2022 Course Name and Code: Python (22616) Semester:6 A Study On
Program Name and Code: (CO6I) Academic Year: 2021-2022 Course Name and Code: Python (22616) Semester:6 A Study On
A STUDY ON
At
1432 GOVERNMENT POLYTECHNIC NANDURBAR.
7)Chaudhari Om Sunil
Academic
Year:-2021-22 Name of Guider: MR.M.M.Goswami Sir
Sem :- Sixth Program Name :ComputerEngg.
Course Name:-
Course Code:22616
PWP
Name of Manoday Ahire
Students: Khushal Ahire
- Bhushan Mahajan
Chetan Patil
Ritik Patil
Kunal
Mali
Chaudhari Om
Title of the “Calculator”
Project:-
pg. 3
Comment/Suggestions about team
Work/leadership/inter w personal Communication
+ All the team members were co-operative and helped
each other. The team members gave full support. Rather,
there were no any mis-understanding among any of any
of the
team members
3102 ManodayAn
ilahire
3109 Mahajan
Bhushan
Pandurang
3101 Khushal
santosh
ahire
3113 Chetan
Satilal Patil
3115 Ritik
Rajendra
Patil
3110 Kunal Kishor
Mali
3104 Chaudhari
Om Sunil
pg. 4
Index
No Name Page No
1 Introduction 6
2 Function is used in 7
Calculator
5 Output 12-15
6 Advantages And 16
Disadvantages
7 Summary 16
pg. 5
Introduction
While creating any GUI Application there are mainly two steps:
Now let's begin with creating a simple calculator app using Tkinter
in Python which is used for basic arithmetic calculations.
pg. 6
Function is used in Calculator
There are a variety of functions in Tkinter with the help of them it
becomes easy and convenient to make a simple calculator just with this
little code.
Apart from the Tkinter widgets, we have defined the following functions in our
code:
btn_click() Function: This function handles the button click on various numeric
buttons to add them to the operation.
bt_clear() Function: This function is used to handle the clear operation to clean
the previous input in the Calculator application.
bt_equal() Function: This function is used to handle the equal button to execute
the operation and show the result.
Now we will show you a snapshot as the output of the above code. And yes you can
implement it on your system for more clear understanding of Calculator App Using
Tkinter.
pg.
7
Python GUI – tkinter
Tkinter is a standard library in python used for creating Graphical User
Interface (GUI) for Desktop Applications. With the help
of Tkinter developing desktop applications is not a tough task.
The primary GUI toolkit we will be using is Tk, which is Python's default
GUI library. We'll access Tk from its Python interface called Tkinter (short for Tk
interface).
import tkinter
pg. 8
Source code
from tkinter import *
win = Tk() # This is to create a basic window win.geometry("312x324") #
this is for the size of the window win.resizable(0, 0) # this is to prevent from
resizing the window win.title("Calculator")
def btn_click(item):
global expression
expression = expression + str(item)
input_text.set(expression)
expression = ""
input_text = StringVar()
pg. 9
input_frame.pack(side=TOP)
input_field.grid(row=0, column=0)
input_field.pack(ipady=10) # 'ipady' is internal padding to increase the height of input field # Let
btns_frame.pack()
# first row
second row
# third row
fourth row
fourth row
win.mainloop()
pg. 11
Addition
pg. 12
Subtraction
pg. 13
Multiplication
pg. 14
Division
pg. 15
Advantages of calculator
This technology allows students solve complicated problems quickly and in an
efficient manner. Additionally, it can reduce the problem to simpler tasks and
allows the student to devote more time in understanding the problem.
Disadvantages of Calculator
Dependency Even though calculators can do the basic operations instantly,
students should not use it all the time.Cheating The availability of graphic
calculators has made it easier for students to cheat during their tests.
Summary:
We developed a basic Calculator application using Tkinter and various widgets of
Tkinter about which we have covered in our Tkinter Tutorial. Click on Next to see
more Apps developed using Tkinter as this will help you practice what you have
learned.
pg. 16
Weekly Work / Progress Report -
pg. 17
ANNEXURE-II
Evaluation Sheet for the Micro Project (Teachers Copy)
Academic
Year: -2021-22 Name of Guider: Mr. M. M. Goswami Sir
Course Name:
- PWP Course Code:22618
Manoday ahire ,
Name of Khushal ahire ,
Students:- Bhushan mahajan
Chetan Patil
Ritik Patil
Kunal Mali,
Om Chaudhari.
pg. 18
➢ Comment/Suggestions about team
work/leadership/inter-personalCommunication
3101
Manoday Anil Ahire
pg. 19