Step-by-step evaluation:
- if num > 7 or num < 21:
- num > 7 → False (since 7 is not greater than 7)
- num < 21 → True (since 7 is less than 21)
- False or True → True → Prints "1"
- if num > 10 or num < 15:
- num > 10 → False (since 7 is not greater than 10)
- num < 15 → True (since 7 is less than 15)
- False or True → True → Prints "2"
0 Comments:
Post a Comment