Computer Science Project
Computer Science Project
2024-25
Submitted by:
Prateek Singh Negi (XI-A)
Certificate
Submitted by:
Prateek Singh Negi (XI-A)
Acknowledgment
I would also like to place on record my sincere gratitude to one and all who
supported and encouraged us in completing the project.
Submitted by:
Prateek Singh Negi (XI-A)
Contents
1 Certificate 02
2 Acknowledgement 03
3 Introduction 05
4 Information Gathering 06
5 Feasibility Study 08
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
Submitted by:
Prateek Singh Negi (XI-A)
Information Gathering
What is Python?
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
Submitted by:
Prateek Singh Negi (XI-A)
Feasibility Study
1.Technical 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.
3.Operational Feasibility:
Submitted by:
Prateek Singh Negi (XI-A)
HISTORY 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.
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.
Abacus
Submitted by:
Prateek Singh Negi (XI-A)
Pascaline
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
1.Flexibility:
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.
3.Challenges:
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 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 math.sqrt(num)
def sine(angle):
return math.sin(math.radians(angle))
def cosine(angle):
return math.cos(math.radians(angle))
def tangent(angle):
return math.tan(math.radians(angle))
def natural_log(num):
if num <= 0:
return "Error! Logarithm undefined for non-positive
numbers."
return math.log(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")
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
1.The 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.
2.What 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)