Python_microproject
Python_microproject
MALVAN
ACADEMIC YEAR 2023-2024
DIPLOMA IN COMPUTER ENGINEERING (THIRD YEAR)
Scientific Calculator
[Subject code : 22616]
Aim of micro-project
1
2 Course Outcome
Proposed
3 Methodology
4 Action Plan
5 Resources Required
6 Literature review
7 Rationale
9 References
Annexure -I
Part A – Micro-Project Proposal
Scientific Calculator
2. Course Outcome
1. Enhanced understanding of Python programming concepts, including
functions, loops, and conditional statements.
2. Proficiency in implementing mathematical algorithms for arithmetic
operations, trigonometric functions, logarithms, and exponentiation.
3. Practical experience in testing and debugging code to ensure accurate
mathematical calculations and reliable performance.
3. Proposed Methodology
1) Firstly, we had gone through various list of topics for the micro project.
2) Further the topic of was finalized and various aspects regarding this project
were noted down.
3) Different concepts which were necessary to complete this project
successfully were studied and thus implemented precisely.
4) A softcopy of the project was prepared and presented.
4. Action Plan
Neha Ravaji
3 Studying Rane
different 04/03/2024 07/03/2024
aspects and Shruti Vilas
concepts of Bedre
the topic
Neha Ravaji
4 Creating of 07/03/2024 09/03/2024 Rane
Softcopy of
the project Shruti Vilas
Bedre
Neha Ravaji
5 Rechecking Rane
and 09/03/2024 09/03/2024
correction Shruti Vilas
of errors Bedre
Shruti Vilas
6 Collection Bedre
of Softcopy 10/03/2024 11/03/2024
and filing
work
Neha Ravaji
7 Submission Rane
of micro
project Shruti Vilas
Bedre
5.Resouces Required
Scientific Calculator
1. Aim of the micro project
1. Develop a versatile tool capable of performing complex mathematical
calculations.
2. Implement fundamental arithmetic operations such as addition, subtraction,
multiplication, and division.
3. Include advanced mathematical functions like trigonometric, logarithmic,
and exponential functions.
4. Create a user-friendly interface allowing users to input mathematical
expressions and obtain accurate results.
5. Provide a valuable tool for students, professionals, and enthusiasts in
scientific and engineering disciplines..
2. Course Outcome
1. Enhanced understanding of Python programming concepts, including
functions, loops, and conditional statements.
2. Proficiency in implementing mathematical algorithms for arithmetic
operations, trigonometric functions, logarithms, and exponentiation.
3. Practical experience in testing and debugging code to ensure accurate
mathematical calculations and reliable performance.
4. Development of a valuable tool that can be used for personal, educational,
or professional purposes, showcasing practical application of Python
programming skills
3.Literature Review
4. **Error Handling and Validation**: Study techniques for error handling and
input validation to ensure robustness and reliability of the calculator, preventing
calculation errors and unexpected behaviors.
4.Rationale
1. *Educational Utility*: A scientific calculator microproject provides a
hands-on learning experience for students to reinforce their understanding of
Python programming concepts while simultaneously exploring mathematical
operations commonly used in scientific disciplines.
import math
def square_root(x):
return math.sqrt(x)
def power(x, y):
return x ** y
def sin(x):
return math.sin(math.radians(x))
def cos(x):
return math.cos(math.radians(x))
def tan(x):
return math.tan(math.radians(x))
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
# Example usage:
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
print("1. Add")
print("2. Subtract")
print("3. Multiply")
print("4. Divide")
print("5. Square Root")
print("6. Power")
print("7. Sine")
print("8. Cosine")
print("9. Tangent")
print("10. Factorial")
if choice == '1':
result = add(num1, operand)
elif choice == '2':
result = subtract(num1, operand)
elif choice == '3':
result = multiply(num1, operand)
elif choice == '4':
result = divide(num1, operand)
elif choice == '5':
result = square_root(num1)
elif choice == '6':
result = power(num1, operand)
elif choice == '7':
result = sin(num1)
elif choice == '8':
result = cos(num1)
elif choice == '9':
result = tan(num1)
elif choice == '10':
result = factorial(int(num1))
else:
result = "Invalid input"
print("Result:", result)
Output
6.References
www.wikipedia.com
https://practice.geeksforgeeks.org