Page 179 - AI Ver 3.0 Class 11
P. 179
# Logical NOT: Inverts the result, True becomes False and False becomes True
logical_not_result = not (x == y)
print("Logical NOT Result:", logical_not_result)
Output:
Logical AND Result: True
Logical OR Result: True
Logical NOT Result: True
Task #Coding & Computational Thinking
Write Python scripts for the following:
1. Accept a number and display its square and cube.
2. Accept the length and breadth of a rectangle. Display its area and perimeter.
3. Accept principal amount, rate of interest and time period. Calculate and display simple interest.
4. Predict the output:
print((7 + 3) - (7 + 3))
print(100 + 15 * 2)
Python Programming 177

