0% found this document useful (0 votes)
72 views20 pages

Program Name and Code: (CO6I) Academic Year: 2021-2022 Course Name and Code: Python (22616) Semester:6 A Study On

The document describes a micro project report submitted by 7 students for their 6th semester Python course, where they developed a basic calculator application using the Tkinter module in Python to create a graphical user interface. The report includes details of the students, the purpose and functions used in the calculator program, an explanation of the Tkinter module, the source code for the application, example outputs, and an evaluation of the students' work.

Uploaded by

Harshal Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views20 pages

Program Name and Code: (CO6I) Academic Year: 2021-2022 Course Name and Code: Python (22616) Semester:6 A Study On

The document describes a micro project report submitted by 7 students for their 6th semester Python course, where they developed a basic calculator application using the Tkinter module in Python to create a graphical user interface. The report includes details of the students, the purpose and functions used in the calculator program, an explanation of the Tkinter module, the source code for the application, example outputs, and an evaluation of the students' work.

Uploaded by

Harshal Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Program name and code: (CO6I) Academic Year : 2021-2022

Course name and code : Python (22616) Semester :6TH

A STUDY ON

MICRO PROJECT REPORT BASED ON

Sr Name of Student Rol Enrollmen


.no l t No.
No.
1) Ahire Manoday Anil 3102 1914320071
2) Mahajan Bhushan P. 3109 1914320080
3) Patil Chetan Satilal 3113 1914320085
4) Patil Ritik Rajendra 3115 1914320088
5) Ahire Khushal Santosh 3101 1914320070
6) Mali Kunal Kishor 3110 1914320081
7) Chaudhari Om Sunil 3104 1914320073
Submitted on / /2022 by the group of 5 students

Under the guided by


MR.M.M.Goswami Sir
Second Years Diploma Program in Engineering & Technology of
Maharashtra State Board of Technical Education, Mumbai (Autonomous)
ISO 9001:2008 (ISO/IEC-27001:2013)

At
1432 GOVERNMENT POLYTECHNIC NANDURBAR.

Maharashtra State Board of Technical Education,


Mumbai.
pg. 1
Certificate
is to certify that: - 1) Ahire Manoday Anil
2) Mahajan Bhushan P.
3) Patil Chetan Satilal

4) Patil Ritik Rajendra

5) Ahire Khushal Santosh

6)Mali Kunal Kishor

7)Chaudhari Om Sunil

Of Sixth Semester of Computer Engineering –


Diploma Program in Computer Engineering & Technology
at 1432 GOVERNMENT POLYTECHNIC, NANDURBAR.
has completed
The (Micro Project) satisfactorily in Subject PWP (22616 ) in the academic
year 2021- 2022 as prescribed in the MSBTE curriculum of I Scheme.

Place: NANDURBAR Enrollment No: 1) 1914320071


2) 1914320080
3) 1914320085
4) 1914320088
5) 1914320070
6) 1914320081
7) 1914320073

Project Guide Principal Head of Department


pg. 2
ANNEXURE-I

Evaluation Sheet for the Micro Project (Teachers Copy)

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:-

➢ addressed by the Micro Project:

(A) Major Learning Outcomes achieved by


students bydoing the Project:
(B)
(a) Practical Outcomes:
(b) Using
(c) Outcomes (in Cognitive domain)
(d) Outcomes in Affective Domain

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

Roll No. Students Total Total Total Remark


Name
marks marks
(theory) (practicle)

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

3 Python GUI – tkinter 8

4 Source Code 9-11

5 Output 12-15

6 Advantages And 16
Disadvantages

7 Summary 16

pg. 5
Introduction

For those who do not know, a calculator is basically a


program on a computer that simulates the behavior of any hand-
held calculator useful for performing Mathematical
Calculations. It is a very basic device used in our everyday lives. Now
all the smartphones also have a Calculator application in them.

While creating any GUI Application there are mainly two steps:

 The first step is to create a User Interface.


 The second step is the most important one and in this, to add
functionalities to the GUI

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.

Tkinter:-Tkinter is a python binding to the Tk GUI toolkit. It is the standard


python interface to the Tk GUI toolkit, and is Python’s de facto standard GUI.
Tkinter is included with standard GNU/Linux, Microsoft Windows and macOS
installs of Python. The name Tkinter comes from Tk interface.

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).

Python offers multiple options for developing GUI (Graphical User


Interface). Out of all the GUI methods, tkinter is the most commonly used method.
It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python
with tkinter is the fastest and easiest way to create the GUI applications. Creating a
GUI using tkinter is an easy task.

To create a tkinter app:


Importing the module – tkinter
Create the main window (container)
Add any number of widgets to the main window
Apply the event Trigger on the widgets.

You can determine whether Tkinter is available for your Python


interpreter by attempting to import the Tkinter module - If Tkinter is
available, then there will be no errors, as demonstrated in the following code:

import tkinter

Nothing exploded, so we know we have Tkinter available. If you see


any error like module not found, etc, then your Python interpreter was not
compiled with Tkinter enabled, the module import fails and you might need
to recompile your Python interpreter to gain access to 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")

###################Starting with functions #################### #


'btn_click' function :
# This Function continuously updates the #
input field whenever you enter a number

def btn_click(item):
global expression
expression = expression + str(item)
input_text.set(expression)

# 'bt_clear' function :This is used to clear #


the input field

def bt_clear(): global


expression
expression = ""
input_text.set("")

# 'bt_equal':This method calculates the expression #


present in input field
def bt_equal(): global
expression
result = str(eval(expression)) # 'eval':This function is used to evaluates the string expression directly
input_text.set(result)
expression = ""

expression = ""

# 'StringVar()' :It is used to get the instance of input field

input_text = StringVar()

# Let us creating a frame for the input field

input_frame = Frame(win, width=312, height=50, bd=0, highlightbackground="black",


highlightcolor="black",
highlightthickness=2)

pg. 9
input_frame.pack(side=TOP)

# Let us create a input field inside the 'Frame'

input_field = Entry(input_frame, font=('arial', 18, 'bold'), textvariable=input_text, width=50,


bg="#eee", bd=0,
justify=RIGHT)

input_field.grid(row=0, column=0)

input_field.pack(ipady=10) # 'ipady' is internal padding to increase the height of input field # Let

us creating another 'Frame' for the button below the 'input_frame'

btns_frame = Frame(win, width=312, height=272.5, bg="grey")

btns_frame.pack()

# first row

clear = Button(btns_frame, text="C", fg="black", width=32, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: bt_clear()).grid(row=0, column=0, columnspan=3, padx=1, pady=1)

divide = Button(btns_frame, text="/", fg="black", width=10, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: btn_click("/")).grid(row=0, column=3, padx=1, pady=1) #

second row

seven = Button(btns_frame, text="7", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(7)).grid(row=1, column=0, padx=1, pady=1)

eight = Button(btns_frame, text="8", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(8)).grid(row=1, column=1, padx=1, pady=1)

nine = Button(btns_frame, text="9", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(9)).grid(row=1, column=2, padx=1, pady=1)

multiply = Button(btns_frame, text="*", fg="black", width=10, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: btn_click("*")).grid(row=1, column=3, padx=1, pady=1)

# third row

four = Button(btns_frame, text="4", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(4)).grid(row=2, column=0, padx=1, pady=1)
pg. 10
five = Button(btns_frame, text="5", fg="black", width=10, height=3, bd=0, bg="#fff",
cursor="hand2",
command=lambda: btn_click(5)).grid(row=2, column=1, padx=1, pady=1)

six = Button(btns_frame, text="6", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(6)).grid(row=2, column=2, padx=1, pady=1)

minus = Button(btns_frame, text="-", fg="black", width=10, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: btn_click("-")).grid(row=2, column=3, padx=1, pady=1) #

fourth row

one = Button(btns_frame, text="1", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(1)).grid(row=3, column=0, padx=1, pady=1)

two = Button(btns_frame, text="2", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(2)).grid(row=3, column=1, padx=1, pady=1)

three = Button(btns_frame, text="3", fg="black", width=10, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(3)).grid(row=3, column=2, padx=1, pady=1)

plus = Button(btns_frame, text="+", fg="black", width=10, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: btn_click("+")).grid(row=3, column=3, padx=1, pady=1) #

fourth row

zero = Button(btns_frame, text="0", fg="black", width=21, height=3, bd=0, bg="#fff",


cursor="hand2",
command=lambda: btn_click(0)).grid(row=4, column=0, columnspan=2, padx=1,
pady=1)

point = Button(btns_frame, text=".", fg="black", width=10, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: btn_click(".")).grid(row=4, column=2, padx=1, pady=1)

equals = Button(btns_frame, text="=", fg="black", width=10, height=3, bd=0, bg="#eee",


cursor="hand2",
command=lambda: bt_equal()).grid(row=4, column=3, padx=1, pady=1)

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 -

Details of 16 Engagement Hours of the Student


Regarding Completion of the Project
Sign
Timin Work or activity Performed of the
We g Guide
ek Date
No. Dura
From To t ion
in
min.
3.00 4.00 15 Discussion and Finalization
1
pm pm min of the Project Title
4.00 4.30 30 Preparation and Submission
2
pm pm min of Abstracts
3.00 4.00 20
3 Literature Review
pm pm min
4.00 6.00 3
4 Collection of Data
pm pm hou
r
3.00 3.30 30 Discussion and Outline
6
pm pm min of Content
4.00 3. 30 30 Rough Writing of the
7
pm pm min Projects Contents
3.00 4.00 1 Editing and Proof Reading of
8
pm pm hou the Contents
r
3.00 4.00
9 1hour Final Completion of the Project
pm pm
3.00 4.00 45 Assessment and Submission
1
pm pm min of Report
0

pg. 17
ANNEXURE-II
Evaluation Sheet for the Micro Project (Teachers Copy)

Academic
Year: -2021-22 Name of Guider: Mr. M. M. Goswami Sir

Sem: - Sixth Program Name: Computer Engg.

Course Name:
- PWP Course Code:22618
Manoday ahire ,
Name of Khushal ahire ,
Students:- Bhushan mahajan
Chetan Patil
Ritik Patil
Kunal Mali,
Om Chaudhari.

Title of the “Calculator”


Project: -

pg. 18
➢ Comment/Suggestions about team
work/leadership/inter-personalCommunication

Marks out Marks out Total Out


of 6 for of 4 for of 10
performan performan
ce in ce in Oral
No Student Name group / presentati
activity on (

3101
Manoday Anil Ahire

3109 Bhushan P. Mahajan

3113 Chetan Satilal Patil

3115 Ritik Rajendra Patil

3101 Khushal Santosh Ahire

3110 Mali Kunal Kishor

3104 Chaudhari Om Sunil

pg. 19

You might also like