You are on page 1of 15

Project Name : Simple Calculator System Academic Year : 2023-2024

Subject Name: Python Programming Semester : Sixth

A STUYDY ON

Simple Calculator System

PROJECT REPORT
Submitted in April 2024 by

NIL CHAN ALOM

GU ROLL: UA-211-162-0014

Under the Guidance of

[ Prof.Prasenjit Nath]

in

Three Years of Bachelor Degree on Information Technology,


Under: Gauhati University
Session:2023-2024

at

[ B. N. College, Dhubri, College Road, Ward No. 15, P.O. Bidyapara,


College Nagar, Dhubri, Assam 783324 ]
CANDIDATE DECLARATION

We hereby declare that the project work entitled “Simple Calculator


System”, This has been submitted for partial fulfilment of requirement for
Bachelor degree under Gauhati University. We have not submitted this
work to any other university or institute for any other degree. This work
was carried out during the period of January 2024 to March 2024.

Name: Nil Chan Alom


Class: B.Voc(IT) 6th Semester
GU Roll: UA-211-162-0014
Department : Information Technology
CERTIFICATE OF APPROVAL FROM THE DEPARTMENT

This is to certify that Nil Chan Alom (23BVOC3RD-2) of 6th Semester


IT(Vocational) department have carried out the project titled “Simple
Calculator System”. B.N College, Dhubri(BNC) in partial fulfilment of
requirement for Bachelor degree.

Date: B.Voc (IT)


B.N.College,Dhubri
CERTIFICATE OF APPROVAL FROM INTERNAL/EXTERNAL EXAMINER

This is to certify that Nil Chan Alom of 6th Semester IT(Vocational)


department have carried out the project titled “Simple Calculator
System”. in partial fulfilment of requirement for Bachelor Degree.

…………………… ……………………
Internal examiner External examiner
Date: Date:
Sr. Title Page No .
Abstract 1
1. Introduction 2-3
2. Literature Survey 4
3. ER Diagram 5
4. Implementation 6
5. Output 7
6. Conclusions 8
7. References 9
Abstract

The simple calculator is a system software which allows us to perform simple mathematical
operations such as addition, substraction , multiplication, division etc. To develop this system we
have used the concept of class and object first we defined the class calculator and defined the
various function inside this class for various mathematical operations and each function is
different from each other. After that we prompted user to provide the input for two numbers. And
at the end of the program we have created the object of calculator class and called all the function
defined inside the class one after one for different tasks as per their respective operations.

1|Page
Introduction
Python is a widely used general-purpose, high level programming language. It was created by
Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was
designed with an emphasis on code readability, and its syntax allows programmers to express their
concepts in fewer lines of code. Python is a programming language that lets you work quickly and
integrate systems more efficiently. Python is a powerful general-purpose programming language.
It is used to develop web applications, data science, creating software prototypes and so on.
Fortunately for beginners, Python has simple easy-to-use syntax. This makes Python an excellent
language to learn to program for beginners.

A class is a code template for creating objects. Objects have member variables and have behaviour
associated with them. In python a class is created by the keyword class.An object is created using
the constructor of the class. This object will then be called the instance of the class.
In Python we create instances in the following manner

Instance = class(arguments)

A class by itself is of no use unless there is some functionality associated with it. Functionalities
are defined by setting attributes, which act as containers for data and functions related to those
attributes. Those functions are called methods.

Attributes:
A class by itself is of no use unless there is some functionality associated with it. Functionalities
are defined by setting attributes, which act as containers for data and functions related to those
attributes. Those functions are called methods.

You can define the following class with the name Snake. This class will have an attribute name.

>>> class Snake:


... name = "python" # set an attribute `name` of the class

2|Page
...

A function object is created with the def statement. Primarily, we want to evaluate the function
objects we create. However, because a function is an object, it has attributes, and it can be
manipulated to a limited extent.

From a syntax point of view, a name followed by ()'s is a function call. You can think of the ()'s as
the "call" operator: they require evaluation of the arguments, then they apply the function.

name ( arguments )

When we use a function name without ()'s, we are talking about the function object. There are a
number of manipulations that you might want to do with a function object.

Call The Function. By far, the most common use for a function object is to call it. When we follow
a function name with ()'s, we are calling the function: evaluating the arguments, and applying the
function. Calling the function is the most common manipulation.

Alias The Function. This is dangerous, because it can make a program obscure. However, it can
also simplify the evoluation and enhancement of software. Imagine that the first version of our
program had two functions named rollDie and rollDice.

By using the above concept we have developed the simple calculator system we have developed
this system we have used the concept of class and object first we defined the class calculator and
defined the various function inside this class for various mathematical operations and each
function is different from each other. After that we prompted user to provide the input for two
numbers. And at the end of the program we have created the object of calculator class and called
all the function defined inside the class one after one for different as per their respective operations.

3|Page
Literature Survey

One of my first tasks as a new post-doc was to undertake a systematic quantitative literature review.
We wanted to get a feel for the international & NZ literature on functional biodiversity in
agroecosystems, and this was a bit daunting for me as I my background is in invasions, not native
biodiversity or agriculture! Luckily, the review method we chose relies on data, not expert
knowledge - we chose the method developed by Griffith University
(https://www.griffith.edu.au/griffith-sciences/school-environment-
science/research/systematicquantitative-literature-review).
It's quite an exhaustive process but the method does a really good job of catching easily overlooked
papers, and provides a reproducible and transparent method for conducting reviews and meta-
analyses. I'm a fan!

The first few steps involve defining your keywords and databases for undertaking the searches,
and designing a way of storing your papers and extracting the data. Once you've completed the
first 10% of your search, though, you'll need to do a stock-take of the papers that you're picking
up and make sure you haven't missed any key words in your search terms.

It was at this point that I realized two things: a) automating this would save me a lot of time, and
b) there were no existing programs that could do what I wanted. So, I wrote up some python code
to read in all papers, extract the keywords and write them to a new text file. I then used R to rank
them by how commonly they occurred and graph the results, and added any commonlyoccurring
keywords to my database search strings.

4|Page
ER Diagram

5|Page
Implementation
class Calculator:

def addition(self):
print(a + b)

def subtraction(self):
print(a - b)

def multiplication(self): print(a


* b)

def division(self):
print(a / b)

a = int(input("Enter first number:"))


b = int(input("Enter first number:"))

obj = Calculator()

choice = 1 while
choice != 0:
print("1. ADDITION") print("2.
SUBTRACTION") print("3.
MULTIPLICATION") print("4.
DIVISION") choice = int(input("Enter
your choice:")) if choice == 1:
print(obj.addition())
elif choice == 2: print(obj.subtraction())
elif choice == 3: print(obj.multiplication())
elif choice == 4:
print(obj.division())
else:
print(“ Invalid choice”)

6|Page
OUTPUT
Enter first number:3
Enter first number:2
1. ADDITION
2. SUBTRACTION
3. MULTIPLICATION
4. DIVISION
Enter your choice:1
5
1. ADDITION
2. SUBTRACTION
3. MULTIPLICATION
4. DIVISION
Enter your choice:2
1
1. ADDITION
2. SUBTRACTION
3. MULTIPLICATION
4. DIVISION
Enter your choice:3
6
1. ADDITION
2. SUBTRACTION
3. MULTIPLICATION 4. DIVISION
Enter your choice:4
5

7|Page
Conclusion

We have concluded that we have successfully developed a simple calculator system which
perform the various mathematical operations. We have used the concept of class and object to
implement this system and perform a lot of customization so that teachers don’t need to change
anything. We have provide the four functions and each function is responsible for their respective
tasks. This project helps to all the user to perform the mathematical operations very easily.

8|Page
References

Books:

1. Python Crash Course


2. Head First Python
3. Learn Python the Hard Way
4. A Byte of Python

Websites:

https://www.w3schools.com/python/

https://www.tutorialspoint.com/python/.py

9|Page

You might also like