OPERATORS IN PYTHON

 print("my name is arin")

a= 5

b= 9

c= a+b

d=a-b

e= a*b

print("the addition of a and b is", c)

print("the subtraction of a and b is", d)

print("the multiplication of a and b is", e)

print("modular division of a and b is", a%b)


f=4.5

g=20.76

print("the division",f/g)

h= f//g

print("floor division",h)

print("the square of a is", a**2)

b=3

print ("the cube of a is",a**b)

c=a<b

print(c)

c=a==b

print(c)

b=5

c=a!=b

print(c)

d=c>=b

print(d)

f=c<=b

print(f)

a+=b

print(a)

a-=b

print(a)

a*=b

print(a)

a/=b

print(a)

a**=b

print(a)

a=a**b

print(a)

a=True

b=True

c=a and b

print(c)



output

my name is arin

the addition of a and b is 14

the subtraction of a and b is -4

the multiplication of a and b is 45

modular division of a and b is 5

the division 0.2167630057803468

floor division 0.0

the square of a is 25

the cube of a is 125

False

False

False

False

True

10

5

25

5.0

3125.0

2.9802322387695315e+17

True












Comments

Followers

Popular posts from this blog

Arin Bansal: For loop