Comp Sci Project
Comp Sci Project
-------------------
Principal’s sign
TABLE of CONTENTS
SERIA Description
L NO.
1 Certificate
2 Acknowlegdgemen
t
3 Introduction
4 Objective
5 SDLC
6 Modules used
7 Flowchart
8 Source code
9 Bibliography
ACKNOWLEDGEMENT
I would like to express a deep sense of thanks and gratitude to
my project guide Mr.prajjwal for guiding me immensely
through the course of the project.
He always envinced keen interest in my project. His
constructive advice and constant motivation have been
responsible for the successful completion of this project
Last but not the least , I would like to thank all those who had
helped me directly or indirectly towards the completion of the
project
Devashish Roy
CLASS- XI A
INTRODUCTION
A scientific calculator which can perform addition,
subtraction, multiplication and division of 2
numbers at a time
1.math module:
The math module contains many mathematic functions
and operators
Like square root, logarithm , etc.
BASIC LOGARITHMS
ARITHMETIC Trigonometric
functions
math.log( , )
math.sin()
math.cos()
math.tan()
SOURCE CODE FOR SCIENTIFIC
CALCULATOR :
import math
print("Scientific Calculator")
print("1. Addition")
print("2. Subtraction")
print("3. Multiplication")
print("4. Division")
print("5. Exponentiation")
print("6. Square Root")
print("7. Logarithm")
print("8. Trigonometric Functions")
print("0. Exit")
while True:
choice = int(input("Enter your choice: "))
if choice == 0:
print("Exiting...")
break
elif choice == 1:
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
result = num1 + num2
print("The sum is:", result)
elif choice == 2:
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
result = num1 - num2
print("The difference is:", result)
elif choice == 3:
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
result = num1 * num2
print("The product is:", result)
elif choice == 4:
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
result = num1 / num2
print("The quotient is:", result)
elif choice == 5:
base = float(input("Enter the base: "))
exponent = float(input("Enter the exponent: "))
result = math.pow(base, exponent)
print("The result is:", result)
elif choice == 6:
num = float(input("Enter the number: "))
result = math.sqrt(num)
print("The square root is:", result)
elif choice == 7:
num = float(input("Enter the number: "))
base = float(input("Enter the base: "))
result = math.log(num, base)
print("The logarithm is:", result)
elif choice == 8:
angle = float(input("Enter the angle in degrees: "))
result_sin = math.sin(math.radians(angle))
result_cos = math.cos(math.radians(angle))
result_tan = math.tan(math.radians(angle))
print("Sine:", result_sin)
print("Cosine:", result_cos)
print("Tangent:", result_tan)
else:
print("Invalid choice. Please enter a valid option.")
OUTPUT SCREEN:
Scientific Calculator
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Exponentiation
6. Square root
7. Logarithm
8. Trignometric function
0. Exit
Enter your choice: 6
Enter the number : 16
The square root is 4.0
Enter your choice : 0
Exitiing….
Requirements Hardware required :-
Modern Operating System: Windows 7 or 10
Mac OS X 10.11 or higher, 64-bit Linux: RHEL
6/7, 64-bit (almost all libraries also work in
Ubuntu)
X86 64-bit CPU (Intel / AMD architecture)
4 GB RAM
5 GB free space
Printer for printing project
Software required :-
Operating System – Windows 10
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8
2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on
win32 for execution of program MS word, for
preparing documentation
BIBLIOGRAPHY:
1. www.wikipedia.com
2. www.google.com
3. https://pythonmania.org
4. Computer science with python by
Sumita Arora Class XI