Fs20co047 Py Exp 2
Fs20co047 Py Exp 2
FS20CO047
Experiment 2
1.Addition (+)
Addition operator in python is being used to add two operands(values)
in python programming.
Syntax:- x + y
2.Subtraction (-)
Subtraction is used to execute a mathematical function which
subtracts the right hand operand from the left hand one.
Syntax:- x - y
3.Multiplication (*)
It is used in python programming to multiply the values and thereby to
get output.
Syntax:- x * y
4.Division (/)
Division Operator is used to divide the left hand operand by right hand
one.
Syntax:- x / y
3 Python Exp 2
Comparison Operators:-
3.Not Equal to (! =)
This Not equal operator is used to compare two operands and
returns True statement if they are Not equal, and False if they are Equal.
Syntax:- x != y
4.Equal to (= =)
Equal operator is used to compare the two values and to give the
result whether they are equal or not. If both the values are equal, then it
gives the result as True, if not False.
Syntax:- x == y
Bitwise Operators:-
4.Binary OR (|)
This operator performs bit by bit OR operations on the values on
either side of the operator.
Syntax:- x|y
Practical:
A. Program and output for demonstration of minimum 8
operators.
Program:-
7 Python Exp 2
Observation:
a.
Output:-
Conclusion:
In the above experiment I learned how to use the and perform various
operations using it.