PP R16 UNIT-4 AND UNIT-6
netaji gandi
Monday, September 23, 2019
| Best Case | O(n) |
| Average Case | O(n2) |
| Worst Case | O(n2) |
input().min() function and store the value in numbers_min variable.numbers_min variable which we got in the previous step.numbers_min print the value as LCM and break the loopnumbers_min value and continue while loop.| Operator | Meaning | Description | Example |
|---|---|---|---|
| + | Addition | Performs mathematical addition on both side of the operator | a + b = 13 |
| - | Subtraction | Subtracts the right-hand operand from the left-hand operand | a - b = 7 |
| * | Multiplication | Multiplies values on both sides of the operator | a * b = 30 |
| / | Division | Performs division by Dividing left-hand operand by right-hand operand | a / b = 3.3333333333333335 |
| % | Modulus | Performs division by Dividing left-hand operand by right-hand operand and returns remainder | a % b = 1 |
| ** | Exponent | Performs exponential (power) calculation on operators | a ** b = 1000 |
| // | Floor Division | Performs division which the digits after the decimal point are removed. But if one of the operands is negative, the result is rounded away from zero (towards negative infinity) | a // b = 3 |
| Operator | Meaning | Description | Example |
|---|---|---|---|
| = | Assignment | Assigns right-hand side value to left-hand side variable | a = 10 |
| += | Add and Assign | Adds right operand to the left operand and assign the result to left operand | a += b ≈ ( a = a + b ) |
| -= | Subtract and Assign | Subtracts right operand from the left operand and assign the result to left operand | a -= b ≈ ( a = a - b ) |
| *= | Multiply and Assign | Multiplies right operand with the left operand and assign the result to left operand | a *= b ≈ ( a = a * b ) |
| /= | Division and Assign | Divides left operand with the right operand and assign the result to left operand | a /= b ≈ ( a = a / b ) |
| %= | Modulus and Assign | Takes modulus using two operands and assign the result to left operand | a %= b ≈ ( a = a % b ) |
| **= | Exponent and Assign | Performs exponential calculation on operators and assign value to the left operand | a **= b ≈ ( a = a ** b ) |
| //= | Floor Division and Assign | Performs floor division on operators and assign value to the left operand | a //= b ≈ ( a = a // b ) |
| Operator | Meaning | Description | Example |
|---|---|---|---|
| < | Less than | Returns True if left-hand side value is smaller than right-hand side value, otherwise returns False. | a < b (False) |
| <= | Less than or Equal to | Returns True if left-hand side value is smaller than or equal to right-hand side value, otherwise returns False. | a <= b ( False ) |
| > | Greater than | Returns True if left-hand side value is larger than right-hand side value, otherwise returns False. | a > b ( True ) |
| >= | Graeter than or Equal to | Returns True if left-hand side value is larger than or equal to right-hand side value, otherwise returns False. | a >= b ( True ) |
| == | Equal to | Returns True if left-hand side value is equal to right-hand side value, otherwise returns False. | a == b ( False ) |
| != | Not equal to | Returns True if left-hand side value is not equal to right-hand side value, otherwise returns False. | a != b ( True ) |
| Operator | Meaning | Description | Example |
|---|---|---|---|
| and | Logical AND | Returns True if all the conditions are True, otherwise returns False. | a < b and a > c |
| or | Logical OR | Returns False if all the conditions are False, otherwise returns True. | a < b or a > c |
| not | Logical NOT | Returns True if the condition is False, otherwise returns False. | not a > b |
| Operator | Meaning | Description | Example |
|---|---|---|---|
| is | is identical | Returns True if the variables on either side of the operator point to the same object, otherwise returns False. | a is b |
| is not | is not identical | Returns False if the variables on either side of the operator point to the same object, otherwise returns True. | a is not b |
| Operator | Meaning | Description | Example |
|---|---|---|---|
| in | in | Returns True if it finds a variable in the specified sequence, otherwise returns False. | a in list |
| not in | not in | Returns True if it does not finds a variable in the specified sequence, otherwise returns False. | a not in list |
| Operator | Meaning | Description | Example |
|---|---|---|---|
| & | Bitwise AND | Returns True if it finds a variable in the specified sequence, otherwise returns False. | a in list |
| | | Bitwise OR | Returns True if it does not finds a variable in the specified sequence, otherwise returns False. | a not in list |
| ^ | Bitwise Exclusive OR | Returns True if it does not finds a variable in the specified sequence, otherwise returns False. | a not in list |
| ~ | Bitwise Ones Complement | Returns True if it does not finds a variable in the specified sequence, otherwise returns False. | a not in list |
| << | Bitwise Left Shift | Returns True if it does not finds a variable in the specified sequence, otherwise returns False. | a not in list |
| >> | Bitwise Right Shift | Returns True if it does not finds a variable in the specified sequence, otherwise returns False. | a not in list |
Java Programming Lab Experiments VR-23 2025-26 Java Programming Lab Experiments Experiment 1: Fibonacci Sequence The F...