You are on page 1of 13

A Project Report On

SIMPLE CALCULATOR

Submitted by
Guruh Karthic G
Roll.No : 11B04

Under the Guidance of


Ms.S.Monisha M.Sc,B.Ed.,
Teacher

Department of Computer Science


Sakthi Vinayakar Hindu Vidyalaya
CBSE Senior Secondary School,Thoothukudi
Department of Computer Science
Sakthi Vinayakar
Hindu Vidyalaya

CBSE Senior Secondary School


Thoothukudi

Certificate
This is to certify that Guruh Karthic G of class XI-B of Sakthi
Vinayakar Hindu Vidyalaya CBSE Senior Secondary School
Thoothukudi, has successfully completed his project titled Simple
calculator in the subject Computer Science (083) for Session-Ending-
Examination as prescribed by CBSE for the academic year 2021 - 2022.

Date:

Roll No:
Signature of Internal Signature of External Signature of Principal
Examiner Examiner

__________________ ____________________ ______________________


INDEX

S.NO DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 01

02 INTRODUCTION 02

03 OBJECTIVES OF THE PROJECT 02

04 PROPOSED SYSTEM 03

05 HARDWARE AND SOFTWARE 04

06 FLOW CHART 05

07 SOURCE CODE 06

08 OUTPUT SCREEN 09

09 FUTURE ENHANCEMENT 10

10 BIBILIOGRAPHY 10
Acknowledgement
Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of
this project.I express deep sense of gratitude to almighty God for giving me strength
for the successful completion of the project.

I gratefully acknowledge the contribution of the individuals who contributed


in bringing this project up to this level, who continues to look after me despite my
flaws.

My sincere thanks to, our class teacher Ms.S.Monisha, a guide, Mentor

all the above a friend, who critically reviewed my project and helped in solving each
and every problem, occurred during implementation of the project.

I express my deep sense of gratitude to the luminary our Principal


Mrs.S.Parvathi, who has been continuously motivating and extending their helping
hand to us.

I express my sincere thanks to our Vice Principal Mrs.S.Pushparani, for


constant encouragement and the guidance provided during this project

The guidance and support received from all the members who contributed and
who are contributing to this project, was vital for the success of the project.

I am grateful for their constant support and help.

1
Introduction
This is a software that can add, subtract, multiply or divide two or more
numbers. This project uses Python, a programming language supported by most web
browsers.

Objectives of the project


The objective of this project is to let the students apply programming
knowledge into real world situations and expose the students to how programming
skills helps in developing a good software.

1. Write programs utilizing modern software tools.

2. Apply object-oriented programming principles effectively when


developing small to medium sized projects.

3. Write effective procedural code to solve small to medium sized problems.

4. Students will demonstrate a breadth of knowledge in computer science


project, requiring writing and presentation skills which exemplify
scholarly style in computer science.

5. Students will demonstrate ability to conduct search or applied computer


science project.

6. Demonstrate proficiency in problem solving techniques using the


computer.
Proposed system

This project was centralised on the Design and


implementation of a simple calculator for education
organization. The study traced calculator system as a tool to
completely change mathematical knowledge and sophisticated
problems solving strategies had advanced the field of simulated
engine in mathematic.
This project work also focused principally on numbers and
arithmetic operation. This researcher investigated the manual
system in detail with a view to finding out the need to automate
the system.

Interestingly, the end result of simple calculator system was its


ability to process number and operators, and provides a useful
result.

Therefore, this project will help immensely in the following way.


Easy calculating of tedious mathematical problems, easy to
retrieval of errors and it will also be of a good assistance to any
researcher on these topics
HARDWARE AND SOFTWARE REQUIREMENTS

OPERATING SYSTEM : WINDOWS 7, 8, 8.1, 10, 11

RAM : 2/4 GB

SPACE REQUIRED : 5 GB

CD/DVD r/w multi drive combo : (If Backup required)

PEN DRIVE : (If Backup required)

MONITOR : Required
KEYBOARD AND MOUSE : Required

PRINTER : (If Print is required – [Hard copy])

SOFTWARE REQUIREMENT : PYTHON


WINDOWS, LINUX, MACOS
Flow chart
Source Code

import sys
 
print("creator Details")
print("Name: Guruh Karthic  \
        Class: XI B")
print("This calculating program can do two function:\
       1)Simple calculator\
                                              
                                              
2)If you want to perform single function on many number)\
       3)If you want to do calculation by yourself")
Function=int(input("Which function you want to do : "))
if function in range(1,4):
    print("You choose function",function)
    if function == 1:
        print("These Are the folowing set of Operations you can use :)")   
        print("+ for ADDITION, ","- for SUBSTRACTION, "," * for MULTIPLICATION,
","/ for DIVISION, ","**for Power")
        print("
")      
        no=int(input("Enter the number of Inputs with which you want to do the
operation: "))
 
        #max no is 2 and min no is 5       
        if no==2:
            number_1=float(input("Enter The 1st Number:"))
            number_2=float(input("Enter The 2nd Number:"))
        elif no==3:
            number_1=float(input("Enter The 1st Number:"))
            number_2=float(input("Enter The 2nd Number:"))
            number_3=float(input("Enter The 3rd Number:"))
        elif no==4:
            number_1=float(input("Enter The 1st Number:"))
            number_2=float(input("Enter The 2nd Number:"))
            number_3=float(input("Enter The 3rd Number:"))
            number_4=float(input("Enter The 4th Number:"))
        elif no==5:
            number_1=float(input("Enter The 1st Number:"))
            number_2=float(input("Enter The 2nd Number:"))
            number_3=float(input("Enter The 3rd Number:"))
            number_4=float(input("Enter The 4th Number:"))
            number_5=float(input("Enter The 5th Number:"))
        else:
            print("Minimun number with which operation can be done is 2 &
Maximum number with which operation can be done is 5")
            quit()
            os.execv(clculator.py, sys.argv)
        "+ - ADDITION"
        "- - SUBSTRACTION"
        "* - MULTIPLICATION"
    "/ - DIVISION"
        "** - power"
        user_input = input("Enter the Function to be used:")
        if user_input == "+" and no==2:
            number_3=0
            number_4=0
            number_5=0
        if user_input == "+" and no==3:
            number_4=0
            number_5=0
        if user_input == "+" and no==4:
            number_5=0
        if user_input == "-" and no==2:
            number_3=0
            number_4=0
            number_5=0
        if user_input == "-" and no==3:
            number_4=0
            number_5=0
        if user_input == "-" and no==4:
            number_5=0
        if user_input == "*" and no==2:
            number_3=1
            number_4=1
            number_5=1
        if user_input == "*" and no==3:
            number_4=1
            number_5=1
        if user_input == "*" and no==4:
            number_5=1
        if user_input == "/" and no==2:
            number_3=1
            number_4=1
            number_5=1
        if user_input == "/" and no==3:
            number_4=1
            number_5=1
        if user_input == "/" and no==4:
            number_5=1
        if user_input == "+":
            output = number_2 + number_1+ number_3+ number_4+ number_5
            print(output)
        elif user_input == "-":
            output = number_2 - number_1-number_3- number_4- number_5
            print(output)
        elif user_input == "*":
            output = number_2 * number_1* number_3* number_4* number_5
            print(output)
        elif user_input == "/":
            output = number_1 / number_2/ number_3/ number_4/ number_5
      print(output)
        elif user_input == "n":
            output = number_2 ** number_1
            print(output)
        else:
            print ("!*!*! Invalid Entry !*!*!")
    elif function == 2:
        operation = input("Operation you want to perform : ")
        if operation == "+":
            test_string = input("Numbers:")
            res = [int(i) for i in test_string.split() if i.isdigit()]
            a=0
            for z in res:
                a+=z
            print(a)   
        elif operation == "*":
            test_string = input("Numbers:")
            res = [int(i) for i in test_string.split() if i.isdigit()]
            m=1
            for z in res:
                m*=z
            print(m)    
        elif operation == "**":
            p = int(input("Number to whose you want to calculate power : "))
            pp = int(input("Which power you wan to calculate : "))
            ppp = p**pp
            print(ppp)
        elif operation == "-":
            s = int(input("Number from which you want to subtract : "))
            test_string = input("Numbers you want to subtract :")
            res = [int(i) for i in test_string.split() if i.isdigit()]
            for z in res:
                s-=z
            print(s)
        elif operation == "/":
            d = int(input("Number from which you want to divide : "))
            test_string = input("Numbers:")
            res = [int(i) for i in test_string.split() if i.isdigit()]
            for z in res:
                d/=z
            print(d)
        elif operation == "%":
            r = int(input("Number which will be divided : "))
            rr = int(input("Number which will divide : "))
            rrr = r%rr
            print("Remainder is", + rrr)        
        else :
            print("Type Correct operator")
    else:
        print("Currently working on it, will be done soon. If you want to help you
can connect through GSJ@gmail.com")
else:
    print("Please Choose Correctly")

Output
Output for the result of a problem using two numbers with different mathematical
functions.

Future Enhancement
In the future, this program can be made compatible to use it for various
kinds of big sized problems like for calculus where multiplication, division
subtraction and addition is needed. Not only for calculus , also it can be used to solve
any difficult problem which may arrive in future.

This program is open source and addition features can be contributed in freakpython
hub.

At : https://freakpython.com/GSM/simple-calculator

Bibliography

1. Computer science with python-Class XI B By: Sumit Arora

You might also like