1.

What are operators?what is their function?give examples of unary and binary operators in python​

Answer»

Operators are special symbols in Python that carry out arithmetic or logical COMPUTATION. The value that the OPERATOR operates on is called the operand. For example: >>> 2+3 5. Here, + is the operator that performs addition. 2 and 3 are the operands and 5 is the OUTPUT of the operation.FUNCTION:Operators are special symbols inPython that carry out arithmetic or logical computation. The value that the operator operates on is called the operand. Here, + is theoperator that performs addition. 2 and 3 are the operands and 5 is the output of the operation.EXAMPLE OF BINARY OPERATOR:a = 2+2print(a)OUTPUT:4EXAMPLE OF UNARY OPERATOR:a += 2print(a)OUTPUT:4



Discussion

No Comment Found