A conditional group combines an if statement with zero or more elif clauses and an optional else clause. It tests conditions in order and executes only the first branch whose condition is True. If no condition is True, else runs when present. section 14.2
Choose one message
num = int(input("Enter a number: ")) if num > 0: print("num is positive") elif num < 0: print("num is negative") else: print("num is zero") For 2, the if branch prints a positive message. For -3, the elif branch prints a negative message. For 0, neither condition is true, so else prints the zero message. section 14.2
