All Python Operators Code
All Python Operators Code
print()
print("Enter 2 nos (try to enter first no > second ) ")
a = float(input("Enter first no:- "))
b = float(input("Enter second no:- "))
print()
print("1. Arithmetic Operators:");
s = (a + b)
print("1.1 Addition:- " ,s );
s = (a - b);
print("1.2 Substraction:- " , s);
s = (a * b)
print("1.3 Multiplication:- " ,s);
s = (a / b)
print("1.1 Division:- " ,s);
s = (a % b)
print("1.4 Modulas:- " ,s);
s = (a ** b)
print("1.5 Exponent:- " ,s);
s = (a // b)
print("1.6 Floor Division:- " ,s);
print()
print()
print()
print()
c = 10
d = 10
e = 15
f = 20
print("2. Relational Operators")
print(" Values of variables:- ")
print(" |c = 10 | d = 10 | e = 15 | f = 20|")
print("2.1 Equal to :-");
if ( c == d):
print("c and d are is equal")
else:
print ("c and d are not equal")
print()