Vikas
Vikas
ASHOKNAGAR
PROJECT REPORT ON
PYTHON PROGRAMMMING
(Mr. Ankush
Raghuwanshi)
2
ACKNOWLEDGEMENT
3
Table of contents
Acknowledgement
About Python
Calculat
or
History
Function
Programming of simple
calculator
Bibliography
Python
Python is a high-level, general-purpose
programming language. Its design philosophy
emphasizes codethe use of significant indentation.
readability with
Python is dynamically typed and garbage-collected. It
supports multiple programming paradigms,
including structured (particularly procedural), object-
oriented and functional programming. It is often
described as a "batteries included" language due
to its comprehensive standard library.
5
Calculator
An electronic calculator is typically a portable electronic
device used to perform calculations, ranging from basic
arithmetic to complex mathematics.
The first solid-state electronic calculator was created in
the early 1960s. Pocket-sized devices became available
in the 1970s, especially after the Intel 4004, the first
microprocessor, was developed by Intel for theJapanese
calculator company Busicom.
Modern electronic calculators vary from cheap, give-
away, credit-card-sized models to sturdy desktop models
with built-in printers. They became popular in the
mid- 1970s as the incorporation of integrated circuits
reduced their size and cost. By the end of that decade,
prices had dropped to the point where a basic calculator
was affordable to most and they became common in
schools.
Computer operating systems as far back as early Unix
have included interactive calculator programs such as dc
and hoc, and interactive BASIC could be used to do
calculations on most 1970s and 1980s home computers.
Calculator functions are included in most smartphones,
tablets and personal digitalassistant (PDA) type devices.
1
In addition to general purpose calculators, there are those
designed for specific markets. For example, there are
scientific calculators which include trigonometric and
statistical calculations. Some calculators even have the
ability to do computer algebra. Graphing calculators can
be used to graph functions defined on the real line, or
higher- dimensional Euclidean space. As of 2016, basic
calculators cost little, but scientific and graphing models
tend to cost more.
W ith the very wide availability of smartphones and
the like, dedicated hardware calculators, while still widely
used, are less common than they once were. In 1986,
calculators still represented an estimated 41% of the
world's general-purpose hardware capacity to compute
information. By 2007, this had diminished to less than
0.05%
2
History of Calculators (in
short)
1623: First Adding
Machine
4
1974: First Handheld Programmable
Calculator
INVENTOR: CASIO
5
Functions
Arithmetic operators are used with numeric values to
perform common mathematical operations:
+ Addition x + y
- Subtraction x - y
* Multiplication x * y
/ Division x / y
% Modulusx % y
** Exponentiation x ** y
// Floor division x // y
6
Addition Operator
In Python, + is the addition operator. It is used to add 2
values. val1= 2
val2 = 3
# using the addition
operator op = val1+ val2
print(op)
Output:
Subtraction Operator
In Python, –is the subtraction operator. It is used to subtract the
second value from the first value.
val1= 2
val2 = 3
# using the subtraction
operator op = val1- val2
print(op)
Output:
-1
7
Multiplication Operator
In Python, * is the multiplication operator. It is used to find the
product of 2 values.
val1= 2
val2 = 3
# using the multiplication
operator op = val1* val2
print(op)
Output :
Division Operator
In Python, / is the division operator. It is used to find the quotient
when the first operand is divided by the second.
val1= 3
val2 = 2
# using the division
operator op = val1/ val2
print(op
)
Output:
1.5
8
Modulus Operator
In Python, % is the modulus operator. It is used to find the
remainder when the first operand is divided by the second.
val1= 3
val2 = 2
# using the modulus
operator op = val1% val2
print(op)
Output:
Exponentiation Operator
In Python, ** is the exponentiation operator. It is used to raise
the first operand to the power of the second.
val1= 2
val2 = 3
# using the exponentiation
operator op = val1** val2
print(op
)
Output:
8
9
Floor Division Operator
In Python, // is used to conduct the floor division. It is used to
find the floor of the quotient when the first operand is divided
by the second.
val1= 3
val2 = 2
# using the floor
division op = val1//
val2 print(op
Output:
- for subtraction
* for multiplication
/ for division” )
10
a= float(input (“Enter the first number”))
„+‟ :
print (a+b):
elif p== „ –
‟:
print(a-
b): elif p== „
*‟:
print(a*b
) : else:
print(a/
b) :
11
Output :
+ for addition
- for subtraction
* for multiplication
/ for division
12
Enter the second number: 6
3
Enter the sign: /
Enter the first number: 5
Enter the second number: 22.5
13
Bibliography
W ikipedia.com
Class XI Computer Science(NCERT)
https://www.geeksforgeeks.org/python-
arithmetic- operators/
https://edtechmagazine.com/
https://www.w3schools.com/python/
g
loss_python_arithmetic_operators.as
p
THANKYOU
14
15