Mathematical/Arithmetic Operators in Python | Learn Python for Free
Mathematical Operations in Python 3 | Free Python Course
Today we will learn Python 3 Mathematical operators What are Mathematical Operators, Arithmetic Operators, Operators, Subtraction, Addition, Multiplication, Modulus. We will learn all the mathematical operators in detail.
What are Mathematical/Arithmetic operators?
Operators are the symbols which represents the computation. Mathametical operators are used to solve Arithmetic expression.
- Symbol Name
- + Addition
- - Subtraction
- / Division
- % Remainder
- ** Exponentiation
- // Inter Division
Addition-:
It is used to add two or more numbers. It's symbol is (+)
For example-:
44+55=99
print("44+55=",44+55)
Output-: 99
Subtraction-:
It is used to subtract two or more numbers. It's symbol is (-)
For example-:
66-55=11
print("66-55=",66-55)
Output-: 11
Multiplication-:
It is used to multiply two or more numbers. It's symbol is (* )
For example-:
4 x 5= 20
print("4 x 5=",4 * 5)
Output-: 20
Remainder or Modulus-:
It is used to get the remainder. It's symbol is ( % ).
For example-:
32 % 5 = 2
print("32 % 5=", 32 % 5)
Output-: 2
Exponentiation-:
It is used to get the power of the number. It's symbol is ( ** ).
For example-:
Square of 2 is 4
Cube of 2 is 8
print( " Square of 2 is " , 2 ** 2 )
print( " Cube of 2 is " , 2 ** 3 )
Output-: 4
Output-: 8
Integer Division-:
It is used to get quotient. It's symbol is ( // ).
For example-:
Quotient of 30 divide by 5 is 6.
print( " Quotient of 30 divide by 5 is " , 30//5).
Output-: 6
For evaluating the Arithmetic Expression precedence of Arithmetic Operators are-:
Questions for you on Arithmetic Operations :
(1). 12 + 3 * 4 - 6/2
(2). 99+55+8+4*6
(3). 77+5+6-5/9*4
(4). 1+2+3+4+5+6
(5). 85-66*8/2-5
(6). 2**1+5**2+8**2
Comment Below for Answers
For any query comment below
0 Comments