Python Operators Questions
Python Operators Questions
- Explain the behavior of the `%` operator in Python with both positive and negative
numbers.
- What will be the output of `print(5 | 3)` and `print(5 & 3)`? Explain how these bitwise
operations work.
- How does the `is` operator differ from the `==` operator in Python? Provide an example.
- What will be the output of the following code? Explain the order of execution.
```python
print(10 - 4 + 2 * 3)
```
- Compare the results of these two expressions and explain the difference:
```python
print((5 - 2) - 1)
print(5 - (2 - 1))
```