1.
Four features of Python:
Easy to learn, Simple syntax, Interpreted language, Free and open source.
2. Two features of Python:
Easy to learn: Uses simple English-like words.
Interpreted: Executes line by line.
3. Operator and Operand:
Operator is a symbol that performs an operation. Operand is the value on which operation is
performed.
Example: 5 + 3
4. Comparison operators return True or False.
Examples:
10 > 5 → True
7 == 9 → False
5. Logical operator NOT reverses the result.
Example: not True → False
6. Differences between command mode and script mode:
Command mode executes one line at a time.
Script mode executes the whole program.
7. ('A'*3) == 'AAAA' returns False.
Changes:
'A'*4 == 'AAAA'
'A'*3 == 'AAA'
8. Cargo plane fuel problem:
If average ≤ 0 or > 12, assume average = 8.
Fuel needed = 1300 / average.