0% found this document useful (0 votes)
57 views28 pages

Scientific Calculator Project Overview

The document outlines a Computer Science project titled 'Scientific Calculator' completed by Prateek Singh Negi at PM SHRI Kendriya Vidyalaya No.2. It includes a certificate of completion, acknowledgments, and details on the project’s purpose, feasibility study, historical context, source code, and conclusions. The project aims to create a menu-driven Python program that simulates a scientific calculator, enhancing programming and mathematical skills.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views28 pages

Scientific Calculator Project Overview

The document outlines a Computer Science project titled 'Scientific Calculator' completed by Prateek Singh Negi at PM SHRI Kendriya Vidyalaya No.2. It includes a certificate of completion, acknowledgments, and details on the project’s purpose, feasibility study, historical context, source code, and conclusions. The project aims to create a menu-driven Python program that simulates a scientific calculator, enhancing programming and mathematical skills.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COMPUTER SCIENCE PROJECT

2024-25

PM SHRI Kendriya Vidyalaya No.2,


Army,Vadodara
Project name
SCIENTIFIC CALCULATOR

Submitted by:
Prateek Singh Negi (XI-A)
Certificate

This is to certify that Prateek Singh Negi, student of Class XI A, PM

SHRI Kendriya Vidyalaya No. 2 ARMY Baroda has satisfactorily

completed his Computer Science project titled “Scientific

Calculator” as prescribed by the course during the academic year

2024-25 toward partial fulfillment of credit for the computer

practical evaluation, and submitted a satisfactory report, as

compiled in the following pages, under my supervision.

Sh. Ashish Jain


Computer Science
PM SHRI K.V. No.2 ARMY Baroda

Submitted by:
Prateek Singh Negi (XI-A)
Acknowledgment

First and foremost, I would like to express my sincere gratitude to my teacher,


Sh. Ashish Jain, who gave me the opportunity to do my project on the title
’Scientific Calculator’ and without whom this project would not have come
forth. I sincerely thank him for his valuable guidance, support, and
supervision throughout the project.

I would also like to place on record my sincere gratitude to one and all who
supported and encouraged us in completing the project.

Last but not least, I am immensely grateful to my parents and my cousin,


who were with me all the time to encourage and support me.

Thank You Very Much

Submitted by:
Prateek Singh Negi (XI-A)
Contents

Sl. No. Topic Page No.

1 Certificate 02

2 Acknowledgement 03

3 Introduction 05

4 Information Gathering 06

5 Feasibility Study 08

6 History of Scientific Calculator 11

7 Analysis 17

8 Source Code 19

9 Output 24

10 Conclusions 27

11 References / Bibliography 28

Submitted by:
Prateek Singh Negi (XI-A)
Introduction

What is a Scientific Calculator?

 A scientific calculator is a type of electronic calculator


designed to handle complex mathematical functions
beyond basic arithmetic.
 It supports operations such as trigonometry, logarithms,
and exponentiation, making it essential for students,
engineers, and scientists.
Importance of a Scientific Calculator

 Used in various fields including mathematics, physics,


engineering, and finance.
 Provides quick and accurate computations for complex
equations.
 Enhances problem-solving efficiency and reduces
manual calculation errors.
Purpose of the Project

 Create a menu-driven Python program to simulate a


scientific calculator.
 Enhance programming and mathematical skills.
 Provide users with a command-line interface for
performing advanced calculations.
 Writing effective procedural code to solve small
to medium sized problems.

Submitted by:
Prateek Singh Negi (XI-A)
Information Gathering
What is Python?

 Python is a high-level, interpreted programming


language known for its simplicity and readability.
 It supports multiple programming paradigms including
procedural, object-oriented, and functional programming.
 Widely used in web development, data science, artificial
intelligence, automation, and more.
Key Features of Python

 Easy to Learn and Use: Simple syntax similar to the


English language.
 Extensive Libraries: Includes built-in modules for
mathematics, data handling, and machine learning.
 Cross-Platform Compatibility: Runs on various
operating systems like Windows, macOS, and Linux.
 Strong Community Support: Large developer
community with extensive documentation and forums.
Why Use Python for This Project?

 its library covers many aspects of


mathematics, including algebra, combinatorics,
numerical mathematics, number theory, and
calculus.
 Allows for quick prototyping and development.
 Ensures flexibility in expanding the project with
additional features in the future.

Submitted by:
Prateek Singh Negi (XI-A)
System Development Life Cycle (SDLC)
What is SDLC?
 SDLC (Software Development Life Cycle) is a structured approach to software
development.
 It consists of multiple phases that ensure the project is systematically developed and
maintained.

Phases of SDLC

1. Planning: The new system requirements are


defined. In particular, the deficiencies in the
existing system must be addressed with
specific proposals for improvement
2. Requirement Analysis: Gather and document user needs
and expectations.
3. Design: The proposed system is designed.
Plans are laid out concerning the physical
construction, hardware, operating systems,
programming, communications and security
issues.
4. Development: The new system is developed.
The new components and programs must be
obtained and installed. Users of the system
must be trained in its use.
5. Testing: Validate the functionality, correctness, and
performance of the calculator. All aspects of
performance must be tested. If necessary,
adjustments must be made at this stage. Tests
performed may include systems integration
and system testing.
6. Deployment: Release the software for user accessin a
production environment..
Submitted by:
Prateek Singh Negi (XI-A)
7. Maintenance: Fix bugs, update features, and enhance
performance. Hardware or software may need to
be upgraded, replaced or changed in some way
to better fit the needs of the end-users
continuously

Submitted by:
Prateek Singh Negi (XI-A)
Feasibility Study

[Link] feasibility:
The Scientific Calculator holds grips of strengths
of Python, a highly versatile, widely-used, and beginner-
friendly programming language. Python is equipped with
a sizeable standard library, including the math module,
which provides robust and pre-built functionality for
advanced mathematical operations like trigonometric
functions, logarithms, and exponents, solving the need
for writing complicated algorithms from scratch and
making the development process efficient and error-free.
Moreover, the syntax is simple, allowing even newbie
programmers to contribute effectively to the project. The
project can be viewed and be implemented on any device
that supports Python, including Windows, macOS, and
Linux systems, ensuring platform independence.

2. Economic Feasibility:
The project is mostly cost-effective as it uses
entirely the free and open-source software.
Python, the primary tool used, is freely available
for download and usage without any fees. Not
requiring any third party apps or libraries makes
the financial pressur negligible. A standard
computer system with Python installed is sufficient
Submitted by:
Prateek Singh Negi (XI-A)
to develop, test, and run the application. This low-
cost setup makes the project accessible to
students and institutions, even those with limited
resources.

[Link] Feasibility:

 Menu driven interface


 Easy to Use
 Guidance through each step
 Not requiring any major expertise
 Seemless execution
 Meets evolving needs of the generation

Submitted by:
Prateek Singh Negi (XI-A)
HISTORY OF SCIENTIFIC
CALCULATORS

Early Calculating Machines (Pre-Scientific Calculators)


1. Abacus (c. 2400 BCE): One of the earliest calculating tools,
primarily used for arithmetic calculations.
2. Pascaline (1642): Blaise Pascal created this mechanical
calculator capable of performing addition and subtraction. It was
a precursor to later machines and showed the potential for
automating calculations.
3. Leibniz's Step Reckoner (1673): Gottfried Wilhelm Leibniz
developed a machine that could perform addition, subtraction,
multiplication, and division.

The Arrival of Electronic Calculators (Mid-20th Century)


1. First Electronic Calculators (1960s): Early calculators were
large, expensive, and primarily used for basic arithmetic. These
machines were developed based on vacuum tube technology.
2. Introduction of Transistors (1960s): The use of transistors
made electronic calculators more compact and affordable. These
were the first pocket-sized devices.
3. Introduction of Scientific Calculators (1970s):
o Texas Instruments TI-30 (1976): One of the first widely
available scientific calculators, the TI-30 featured a range
of functions including basic arithmetic, square roots,
trigonometric functions, and logarithms.
o Sharp EL-5100 (1977): This model by Sharp added more
complex scientific functions, such as trigonometric and
exponential calculations, making it a major step in the
development of scientific calculators.

Submitted by:
Prateek Singh Negi (XI-A)
The incoming of Digital and Graphing Calculators (1980s
- 1990s)
1. Graphing Calculators (1985): The first true graphing
calculators, like the TI-81 released by Texas Instruments in
1990, allowed users to plot graphs and perform advanced
calculations. These calculators became a valuable tool for higher
education, particularly in subjects like calculus, physics, and
engineering.
2. CASIO fx-7000G (1985): Casio introduced the world's first
graphing calculator, which was capable of plotting graphs and
performing complex mathematical operations.
3. TI-83 (1996): A major leap in calculator technology, this model
became widely used in high schools and colleges for
mathematics and science courses due to its ease of use and
extensive functionality.

Modern Developments (2000s - Present)


1. More Advanced Graphing Calculators (2000s): The TI-
Nspire series and Casio’s fx-9860G+ offered higher processing
power, color displays, and the ability to store more data and
perform more complex simulations.
2. Integration with Computer Software: Many scientific
calculators, especially graphing models, began to integrate with
software like MATLAB or GeoGebra, enhancing their utility for
professional and educational purposes.
3. Scientific Calculators on Smartphones (2010s): With the
advent of smartphones, scientific calculator applications became
widely available, offering advanced functions without needing a
physical calculator.

Submitted by:
Prateek Singh Negi (XI-A)
Key Features of Modern Scientific Calculators:
 Trigonometric Functions: Sine, cosine, tangent, and
their inverses.
 Exponential and Logarithmic Functions: Natural
logarithms, logarithms base 10, and exponents.
 Complex Number Calculations: Calculating with
imaginary numbers.
 Graphing Capabilities: Displaying graphs of functions.
 Programming: Some models allow basic programming
for custom functions.
 Data Storage: Storing equations, variables, and
formulas.

Some Images of the above scientific


Calculators

Abacus

Submitted by:
Prateek Singh Negi (XI-A)
Pascaline

Leibniz's Step Reckoner

Submitted by:
Prateek Singh Negi (XI-A)
Transistor

Submitted by:
Prateek Singh Negi (XI-A)
Mexican Instrument

Submitted by:
Prateek Singh Negi (XI-A)
Analysis
[Link]:
 Wide range of operations
 Basic maths like addition, subtraction etc. as well as
complex and advance problems such as trigonometric
functions, logarithms, square roots, and
exponentiation.
 Meets diverse user requirements to give maximum
output and satisfaction
 Can be for everyday use

2. Ease of use:
 a menu-driven interface
 simplifies user interaction.
 Easy navigation
 even beginners with minimal programming or
mathematical experience can use the calculator
without confusion or difficulty.

[Link]:
a) Input Validation:
One of the key challenges is ensuring that users provide
valid inputs for each operation. For example, if the user
inputs a non-numeric value when a numeric one is expected,
or specifies an invalid base for logarithmic functions, the
program needs to handle such scenarios gracefully.

Submitted by:
Prateek Singh Negi (XI-A)
b) Error Handling :
 Division by zero should not be allowed and should be
displayed with a proper error message.
 Trigonometric functions, may encounter issues for
certain angles where the tangent is undefined.
Effective error-handling strategies are critical to ensure
the calculator remains user-friendly and provides
meaningful feedback in such cases.

Submitted by:
Prateek Singh Negi (XI-A)
Source Code
import math

def add(a, b):


return a + b

def subtract(a, b):


return a - b

def multiply(a, b):


return a * b

def divide(a, b):


if b == 0:
return "Error! Division by zero."
return a / b

def power(base, exp):


return [Link](base, exp)

def square_root(num):
if num < 0:
Submitted by:
Prateek Singh Negi (XI-A)
return "Error! Cannot calculate the square root of a
negative number."
return [Link](num)

def sine(angle):
return [Link]([Link](angle))

def cosine(angle):
return [Link]([Link](angle))

def tangent(angle):
return [Link]([Link](angle))

def natural_log(num):
if num <= 0:
return "Error! Logarithm undefined for non-positive
numbers."
return [Link](num)

def log_base_10(num):
if num <= 0:

Submitted by:
Prateek Singh Negi (XI-A)
return "Error! Logarithm undefined for non-positive
numbers."
return math.log10(num)

def calculator():
while True:
print("\nScientific Calculator")
print("1. Addition")
print("2. Subtraction")
print("3. Multiplication")
print("4. Division")
print("5. Power")
print("6. Square Root")
print("7. Sine")
print("8. Cosine")
print("9. Tangent")
print("10. Natural Logarithm")
print("11. Log Base 10")
print("12. Exit")

choice = input("Select an operation (1-12): ")


if choice == '12':
Submitted by:
Prateek Singh Negi (XI-A)
print("Exiting the calculator. Goodbye!")
break

if choice in ['1', '2', '3', '4', '5']:


num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
if choice == '1':
print(f"Result: {add(num1, num2)}")
elif choice == '2':
print(f"Result: {subtract(num1, num2)}")
elif choice == '3':
print(f"Result: {multiply(num1, num2)}")
elif choice == '4':
print(f"Result: {divide(num1, num2)}")
elif choice == '5':
print(f"Result: {power(num1, num2)}")
elif choice == '6':
num = float(input("Enter a number: "))
print(f"Result: {square_root(num)}")
elif choice in ['7', '8', '9']:
angle = float(input("Enter angle in degrees: "))
if choice == '7':
Submitted by:
Prateek Singh Negi (XI-A)
print(f"Result: {sine(angle)}")
elif choice == '8':
print(f"Result: {cosine(angle)}")
elif choice == '9':
print(f"Result: {tangent(angle)}")
elif choice == '10':
num = float(input("Enter a number: "))
print(f"Result: {natural_log(num)}")
elif choice == '11':
num = float(input("Enter a number: "))
print(f"Result: {log_base_10(num)}")
else:
print("Invalid choice! Please select a valid option.")

# Run the calculator


if __name__ == "__main__":
calculator()

Submitted by:
Prateek Singh Negi (XI-A)
Output

Submitted by:
Prateek Singh Negi (XI-A)
Submitted by:
Prateek Singh Negi (XI-A)
Submitted by:
Prateek Singh Negi (XI-A)
Conclusion
[Link] key takeaways of this project are the following:
 The project demonstrates the use of Python for
real-world applications.
 Reinforces concepts of functions, loops, and error
handling.
 Offers a foundation for creating more advanced
calculators or mathematical tools.
[Link] more can be done to enhance and
upgrade the project:
 Add graphical user interface (GUI) using
libraries like Tkinter or PyQt.
 Include more advanced mathematical
functions.

Submitted by:
Prateek Singh Negi (XI-A)
References:
 Coded with the help of family
member
 Wikipedia
 Internet websites

Submitted by:
Prateek Singh Negi (XI-A)

Common questions

Powered by AI

The Python-based scientific calculator project is economically feasible primarily because it utilizes free and open-source software, significantly reducing costs. Python can be downloaded and used without fees, eliminating financial burdens associated with licensing or proprietary software. Moreover, the project does not require any additional third-party applications or libraries, which further minimizes costs. A standard computer system can suffice for developing, testing, and running the application. This cost-effectiveness makes the project accessible to students and educational institutions, even those with limited financial resources .

The project utilizes Python's high-level, interpreted nature which makes it easy to learn and use due to its simple syntax. Python's extensive standard library includes modules such as 'math', which provides robust functionality for advanced mathematical operations required for a scientific calculator, like trigonometric and logarithmic functions, without needing to write complex algorithms from scratch. Additionally, Python's cross-platform compatibility allows the calculator to be implemented on various operating systems including Windows, macOS, and Linux. This versatility and ease of use, combined with the large community support and documentation, make Python an ideal choice for developing the scientific calculator efficiently .

The development of scientific calculators began in the 1960s with the advent of electronic calculators that relied on vacuum tube technology, making them large and costly. The introduction of transistors in the same decade significantly reduced their size and cost. The 1970s marked the arrival of the first widely available scientific calculators, with models like the Texas Instruments TI-30, which included functions such as trigonometric calculations and logarithms. The 1980s saw the introduction of graphing calculators, such as Casio's fx-7000G, capable of plotting graphs and performing complex mathematical functions. In the 2000s, advanced graphing calculators with color displays and integration with software like MATLAB emerged. By the 2010s, scientific calculator applications became popular on smartphones, offering advanced functionalities typically found in physical calculators .

The primary challenges in developing the scientific calculator project include input validation and error handling. Input validation is essential to ensure users provide the correct numeric inputs for calculations, such as when a non-numeric value or an invalid base for logarithms is entered. To address this, the program implements checks and handles errors like 'division by zero' gracefully by providing appropriate error messages to the user. Moreover, specific trigonometric calculations that could result in undefined values are also managed through effective error-handling strategies, ensuring user-friendliness and meaningful feedback from the calculator .

The operational feasibility of the Python-based scientific calculator project is characterized by its menu-driven interface, which simplifies user interaction, making it easy to use even for individuals with minimal expertise in programming or mathematics. This guided approach through each calculation step ensures a seamless execution and satisfies the evolving needs of modern users by incorporating a wide variety of mathematical functions. The project's ability to meet diverse user requirements and provide efficient and satisfactory outputs denotes its operational practicality, especially in educational settings and everyday use .

The scientific calculator project has substantial potential for expansion through the addition of advanced features. Enhancing the project could involve developing a graphical user interface (GUI) using libraries like Tkinter or PyQt, which would provide a more visually intuitive and user-friendly experience. Furthermore, incorporating more advanced mathematical functions, such as symbolic computations or calculus operations, would increase the calculator's usefulness in higher-level mathematics and engineering contexts. The flexibility of Python allows for such expansions, making the tool more versatile and aligning it closer to professional and academic standards .

A systematic approach through the System Development Life Cycle (SDLC) is crucial in educational projects like the scientific calculator because it ensures that each stage of the software's development is meticulously planned and executed. By following SDLC, students can understand and apply real-world software engineering principles such as requirement analysis, design, testing, and maintenance. This structured methodology promotes comprehensive learning, reduces the risk of overlooking critical functionalities, and enhances the quality and reliability of the final product. It also aligns student projects with industry practices, bridging the gap between academic learning and practical application .

The evolution of scientific calculators highlights the significant technological advancements in computation over time. Starting with mechanical devices like the Pascaline and Leibniz's Step Reckoner for basic arithmetic, calculators progressed to large electronic models in the 1960s using vacuum tubes. The introduction of transistors reduced size and cost, leading to the popularization of portable pocket calculators. The 1970s saw the creation of scientific calculators like the TI-30, which incorporated advanced functions such as trigonometric and exponential calculations. Graphing calculators in the 1980s and 1990s, such as the Casio fx-7000G, further expanded capabilities by allowing graphing and complex mathematical operations. Integration with software and apps on smartphones in the 2000s exemplifies the ongoing integration and miniaturization of calculator technology, reflecting tremendous advances in computational capacity and accessibility .

The phases of the System Development Life Cycle (SDLC) are crucial to the successful development and deployment of the scientific calculator project. Initially, the planning phase defines new system requirements and addresses deficiencies in existing calculators. Requirement analysis gathers user expectations to inform the design phase, where system plans are outlined. During development, the actual system is constructed following these plans, and user training is conducted. The testing phase ensures all calculator functionalities work correctly and adjustments are made as needed. Deployment involves releasing the software for use, while maintenance ensures ongoing improvements and updates post-installation. Each phase ensures a structured approach, minimizing errors and adapting to user needs efficiently .

Python's strong community support plays a vital role in the development of projects such as the scientific calculator by offering extensive documentation, forums, and code repositories. This vast pool of resources simplifies learning, troubleshooting, and implementing Python effectively, especially for learners and developers working on projects independently. Community-contributed libraries and tools often expand Python's capabilities, providing ready-made modules that tackle various complexities, such as mathematical calculations in the case of scientific calculators. This support framework enhances collaboration, speeds up the development process, and fosters learning environments where problems can be addressed collaboratively .

You might also like