0% found this document useful (0 votes)
36 views1 page

Arithmetic Operations

The document discusses various arithmetic operators in Python including addition, subtraction, division, multiplication, exponentiation, modulus, and floor division. Examples are provided for each operator to demonstrate how they work.

Uploaded by

Soham Shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views1 page

Arithmetic Operations

The document discusses various arithmetic operators in Python including addition, subtraction, division, multiplication, exponentiation, modulus, and floor division. Examples are provided for each operator to demonstrate how they work.

Uploaded by

Soham Shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Arithmetic Operators

Arithematic Operators are either symbols or elements to represent a specific mathematical function that is to be performed on values on variables in a python code.

Plus (+) Symbol


Addition:Return Sums of the operands.

Example:

In [1]:
#Addition

a = 345

b = 987

print(a+b)

1332

Minus (-) Symbol


Subtraction:Return Difference of the operands.

Example:

In [2]:
#Substraction

a = 500

b = 250

c = a - b

print(c)

250

Slash (/) Symbol


Division:Returns the quotient of the operands.

Example:

In [4]:
#Division

a = 81

b = 3

print(a/b)

27.0

Asteriks (*) Symbol


Multiplacation:Returns product of the operands.

Example:

In [5]:
#Multiplacation

a = 3.2

b = 4.3

c = 9.4

print(a*b*c)

129.344

Exponentation
Double Asteriks:Returns exponent of the base, like, 2 raised to 4 is 222*2=16.

Example:

In [6]:
a = 5

b = 3

print(a**b)

125

Modulus
Remainder of the divsion;Symbol: %.

In [7]:
a = 4

b = 21

print(b%a)

Floor Division (//)


Division without decimal value.

Example:

In [9]:
a = 253

b = 5

print(a//b)

50

In [ ]:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy