Posts

Showing posts from December, 2023

Practice of Operators

Image
 Practice of  Operators Now we write a program in which we apply the arithmetic operators. Code: Output:- Code:                                         Output:- Code: Output:- Code: Output:-  Her practice  

Python Operator

 Python Operator 2. Comparison operator: Define:   The operator or symbol that is used to compare two or more values. It returns the results as true or false. It is used for condition and decision-making. The symbols are : = = ,  > ,  < ,  > = ,   < = ,  and  != . Some examples are as follows: a = 12 b = 10 == If we write to compare the above two variables as a==b, it will return false because 12 and 10 are not equal. >   This operator is 'is greater'. This operator checks that the first value is greater than the second. As a > b , it will return true because 12 is greater than 10. < This operator is 'is less than'. This operator checks that the first value is less than the second. As a < b , it will return true because 12 is greater than 10. > = This operator is the combination of two symbols > and =. This operation is solved in two steps. If one condition is true, it will return true as a whole. Otherwise ...

Python Operator

  Operators in Python An operator is defined as : The Operator is a sign or symbol that tells the computer to perform an operation. We study the following operator :     1. Arithmetic Operator   2. Comparision Operator   3. Logical Operator   4. Bitwise Operator   5. Assignment Operator   6. Membership Operator   7. Identity Operator