Final Cs Group Project
Final Cs Group Project
Thane
Project Report
On
Arithmetic Calculator
Submitted by
Grade , Div: XI , A
Roll No.: 23
1
Under the Guidance of :
Mrs. Aarati Mahajan
CERTIFICATE
Examination No.
Date:
Registration No.
School Roll No. _
in Computer Science (083) and recorded it in the file during the academic
year 2023 - 24
2
External Examiner Seal of School
3
ACKNOWLEDGEMENT
I would also like to thank my project guide Mrs. Aarati Mahajan for
guiding me immensely throughout the course of the project. Her
constructive advice and constant motivation have been responsible
for the successful completion of this project.
I also would like to thank my parents and family members for their
motivation and support.
Last but not the least; I would like to thank all my team members
and friends for their timely help and support for compilation of this
project.
4
Index
2 HW/SW requirements 6
3 Flow diagram 7
4 Working 8
5 Source Code 10
6 Output screens 13
7 Bibliography 14
5
INTRODUCTION
An arithmetic calculator is a fundamental tool used for performing basic
mathematical operations such as addition, subtraction, multiplication, and
division. It's designed to simplify mathematical computations and provide
accurate results swiftly. With the advent of technology, arithmetic calculators
have evolved from simple mechanical devices to sophisticated electronic
gadgets and software applications.
6
Hardware/Software Requirement
Hardware Requirements:
Processor: A basic processor capable of handling arithmetic operations.
Memory (RAM): A small amount of memory to run the calculator application.
Display: A screen or display to show the calculator interface and input/output.
Power Source: For mobile or handheld calculators, a battery or power source
is needed.
Software Requirements:
Operating System: Compatible with Windows, macOS, Linux, Android, iOS,
or web-based platforms.Programming Language: Developed using languages
like Python,Java,C++, JavaScript, etc.
User Interface: User-friendly interface for inputting numbers and operations
and displaying results.
Arithmetic Operations: Supports basic arithmetic functions like addition,
subtraction, multiplication, division.Additional (Optional)
Requirements:
Scientific Functions: Supports trigonometric, logarithmic, exponential
functions.
Graphical User Interface (GUI): Visual and interactive interface for desktop or
mobile applications.
Error Handling: Handles input errors and displays appropriate messages.
Localization: Supports multiple languages and number formats for
international use.Overall, the hardware and software requirements for an
arithmetic calculator are minimal, making it accessible on various devices and
platforms.
7
Flow chart
The given is the flow chart of Arithmetic Calculator
8
Working for Arithmetic Calculator
Initialization: The code initializes various components of the calculator using the
Turtle graphics library. Each component, like digits, operators, and mathematical
functions, is represented by a Turtle object, which is a drawing tool in Python.
Drawing the Calculator Interface: The main Turtle (t) is used to draw the outline of
the calculator screen. This screen is divided into sections where buttons will be
placed. The screen is essentially a square with some lines inside, creating a grid-like
structure.
Screen Saver Drawing: Another Turtle (l) is used for drawing screen saver-like
animations on the calculator. The letter_* functions are responsible for writing
numbers and symbols on this area, creating a visual display.
Button Definitions: You define the appearance and positions of the buttons on the
calculator. This includes buttons for digits 0-9, basic arithmetic operators (+, -, ×,
÷), and some mathematical functions (sin, cos, tan, log, sqrt).
Keyboard Drawing: Individual Turtle objects are used to draw the buttons on the
calculator screen. This involves drawing rectangles and writing labels for each
button.
User Input Handling: The check_button function is designed to detect mouse clicks
on specific regions of the screen, corresponding to different buttons. When a user
clicks on a button, the corresponding action is triggered, updating the input
expression visible on the calculator.
Screen Output: Another Turtle (a) is used to display the result of calculations. After
the user presses the equal button, the result is calculated using the eval function, and
it's displayed on the screen.
Main Loop: The turtle.mainloop() function initiates the main event loop,
9
which continuously checks for user input. This loop keeps the program responsive
and allows users to interact with the calculator.
User Interaction: Users can interact with the calculator by clicking on the drawn
buttons. The calculator responds by updating the input expression based on the
clicked button and displaying the result when the equal button is pressed.
In summary, your code uses the Turtle graphics library to create a graphical
calculator interface with buttons for digits, operators, and mathematical
functions. It responds to user clicks on these buttons and provides visual
feedback on the screen.
10
Source code
The given is the source code for the arithmetic calculator
11
12
13
Output Screen :
14
Bibliography
https://bard.google.com/chat/7a9525fcb4406e65
https://youtu.be/KseiSR0MCTI?si=ZeLakAVBHiOY8qqx bar
Python.compiler
15