A
MICRO PROJECT REPORT
On
“CALCULATOR”
Mr.Dhekane Atharv Kishor
Type your text
Mr.Punde Tanmay Dnyaneshwar
Mr.Ranchod Likhit Mangesh
Mr. Kotkar Yash Dilip
Under The Guidance of
Prof. S. N. Dudhawade
FIRST YEAR(COMPUTER) DEPARTMENT
AKOLE TALUKA EDUCATION SOCIETY’S
FACULTY OF POLYTECHNIC, AKOLE
ACADEMIC YEAR - 2024-25
CERTIFICATE
This is to certify that the Micro-Project Report entitled
“CALCULATOR”
Has been submitted by,
Mr.Dhekane Atharv Kishor
Type your text
Mr.Punde Tanmay Dnyanshwar
Mr.Ranchod Likhit Mangesh
Mr.Kotkar Yash Dilip
As a partial fulfillment of the prescribed syllabus of Subject
Web Based Application Development using PHP (22619), (Micro-Project) of
Third Year Diploma in Computer Engineering.
Prof. S. N. Dudhawade Prof. S. B. Deshmukh
Project Guide & Subject Head of Department
Teacher
Dr. R. D. Palhade
Principal
ACKNOWLEDGEMENT
It is privilege to acknowledge with deep sense of gratitude to our micro
project guide Prof. S. N. Dudhawade for her valuable suggestions through
out our course of study.
We express our gratitude to Head of Department, Prof. S. B. Deshmukh
for his kind help & co-operation.
We also take this opportunity to thank all our colleagues who backed
us interest by giving useful suggestions & all possible help without whose help
& moral support it would not has been possible to complete this report.
Mr.Dhekane Atharv Kishor
Type your text
Mr.Punde Tanmay Dnyanshwar
Mr.Ranchod Likhit Mangesh
Mr.Kotkar Yash Dilip
CALCULATOR
INDEX
Sr. No Title Page No.
1. Introduction 2
2. Program 6
3. Output 10
4. Conclusion 11
5. Reference 12
1
CALCULATOR
INTRODUCTION
➢ Calculator :-
The calculator was written by Rolf Howarth in early 1996.A fully featured
calculator with proper operator precedence is implemented, including trig
functions and logarithms, factorials, 12 levels of parentheses, logs to base 2(a
handy function for information entrepôts!), bitwise logical operators, hex, octal,
binary and ASCII display. The calculator is written in JavaScript and you are
welcome to view the JavaScript source (visible within the HTML page) for
personal educational purposes as long as you recognize that it is copyrighted and
not in the public domain. This calculator is now available as part of
Hummingbird' Enterprise Information Portal. All enquiries regarding licensing the
calculator should be directed to Hummingbird Ltd.
➢ Basic functions:-
Addition:-
The addition (sum function) is used by clicking on the "+" button or using
the keyboard. The function results in a+b.
Subtraction:-
The subtraction (minus function) is used by clicking on the "-" button or
using the keyboard. The function results in a-b.
Multiplication:-
The multiplication (times function) is used by clicking on the "x" button or using
the keyboard "*" key. The function results in a*b.
Division:-
The division (divide function) is used by clicking on the "/" button or using the
keyboard "/" key. The function results in a/b.
2
CALCULATOR
Sign:-
The sign key (negative key) is used by clicking on the "(-)" button. The
function results in -1*x.
Square:-
The square function is used by clicking on the "x^2" button or type "^2".
The function results in x*x.
Square Root:-
The square root function is used by clicking on the "x" button or type
"sqrt()". This function represents x^.5 where the result squared is equal to x.
Raise to the Power:-
The raise to the power (y raised to the x function) is used by clicking on the
"y^x" button or type "^".
Natural Exponential:-
The natural exponential (e raised to the x) is used by clicking on the "e^x"
button or type "exp()". The result is e (2.71828...) raised to x.
Logarithm:-
The logarithm (LOG) is used by clicking on the "LOG" button or type
"LOG()".
3
CALCULATOR
➢ Description:-
Before developing software we keep following things in mind that we can develop
powerful and quality software.
PROBLEM STATEMENT:-
the user from accessing other user’s data.
FUNCTIONS TO BE PROVIDED:-
The system will be user friendly and completely menu driven so that the users shall
have no problem in using all options.
4
CALCULATOR
➢ System requirements:-
Operating system: MS Windows XP or Windows 10
Language: C Language
Processor: Pentium IV Processor RAM: 512 MB Hard disk: 2 GB.
➢ System design:-
Then we began with the design phase of the system. System design is a
solution, a “HOW TO” approach to the creation of a new system. It translates
system requirements into ways by which they can be made operational. It is a
translational from a user oriented document to a document oriented programmers.
For that, it provides the understanding and procedural details necessary for the
implementation. Here we use Flowchart to supplement the working of the new
system. The system thus made should be reliable, durable and above all should
have least possible maintenance costs. It should overcome all the drawbacks of the
Old existing system and most important of all meet the user requirements.\
➢ Uses:-
Scientific calculators are used widely in situations that require quick access
to certain mathematical functions, especially those that were once looked up in
mathematical tables, such as trigonometric functions or logarithms. They are also
used for calculations of very large or very small numbers, as in some aspects of
astronomy, physics, and chemistry. They are very often required for math classes
from the junior high school level through college, and are generally either
permitted or required on many standardized tests covering math and science
subjects; as a result, many are sold into educational markets to cover this demand,
and some highend models include features making it easier to translate a problem
on a textbook page into calculator input, e.g. by providing a method to enter an
entire problem in as it is written on the page using simple formatting tools.
5
CALCULATOR
➢ Calculator program :-
PHP File
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Advanced PHP Calculator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="calculator">
<h1>Advanced PHP Calculator</h1>
<form method="POST" action="">
<input type="number" step="any" name="num1" placeholder="Enter first
number" required>
<input type="number" step="any" name="num2" placeholder="Enter second
number (if needed)">
<select name="operation">
<option value="add">Addition (+)</option>
<option value="subtract">Subtraction (-)</option>
<option value="multiply">Multiplication (×)</option>
<option value="divide">Division (÷)</option>
<option value="power">Exponentiation (^)</option>
<option value="sqrt">Square Root (√)</option>
<option value="percentage">Percentage (%)</option>
<option value="sin">Sine (sin)</option>
<option value="cos">Cosine (cos)</option>
<option value="tan">Tangent (tan)</option>
<option value="log">Logarithm (log)</option>
</select>
<button type="submit" name="calculate">Calculate</button>
</form>
<?php
if (isset($_POST['calculate'])) {
$num1 = $_POST['num1'];
$num2 = isset($_POST['num2']) ? $_POST['num2'] : null;
$operation = $_POST['operation'];
$result = '';
switch ($operation) {
6
CALCULATOR
case 'add':
$result = $num1 + $num2;
break;
case 'subtract':
$result = $num1 - $num2;
break;
case 'multiply':
$result = $num1 * $num2;
break;
case 'divide':
$result = $num2 != 0 ? $num1 / $num2 : "Division by zero is not
allowed.";
break;
case 'power':
$result = pow($num1, $num2);
break;
case 'sqrt':
$result = $num1 >= 0 ? sqrt($num1) : "Square root of a negative
number is not real.";
break;
case 'percentage':
$result = ($num1 * $num2) / 100;
break;
case 'sin':
$result = sin(deg2rad($num1));
break;
case 'cos':
$result = cos(deg2rad($num1));
break;
case 'tan':
$result = tan(deg2rad($num1));
break;
case 'log':
$result = $num1 > 0 ? log($num1) : "Logarithm of a non-positive
number is undefined.";
break;
default:
$result = "Invalid operation.";
}
echo "<h2>Result: $result</h2>";
}
?>
</div>
</body>
</html
7
CALCULATOR
CSS File
body {
font-family: 'Arial', sans-serif;
background-color: #e9ecef;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.calculator {
background: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
width: 350px;
}
h1 {
margin-bottom: 20px;
font-size: 24px;
color: #333;
}
input, select, button {
width: 100%;
padding: 11px;
margin: 11px 0;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
background:darkgreen;
color: #fff;
border: none;
cursor: pointer;
font-size: 16px;
}
8
CALCULATOR
button:hover {
background: #0056b3;
}
h2 {
margin-top: 20px;
color: #333;
}
9
SCIENTIFIC CALCULATOR
➢ Output :-
10
SCIENTIFIC CALCULATOR
➢ Conclusion :-
Hope you enjoyed building the Calculator as much as I enjoyed creating it for
you!! We learned how to deal with collisions between different objects and re-
rendering the object as they go out of view. You can try adding more functionalities
like creating more obstacles in the way or to increase the difficulty of the game you
can try increasing the speed of the car after each level.
11
SCIENTIFIC CALCULATOR
➢ References :-
• https://en.m.wikipedia.org/wiki/Scientific_calculator
• https://www.thoughtco.com/how-to-use-a-scientific-calculator-4088420
• https://www.hp.com/us-en/shop/tech-takes/top-5-uses-for-a-scientific-calculator
12