Problem 112093 · easy · Phase 01 Prerequisites & Setup

Describe the Number

conditionals · modulo · boolean logic

Write describe_number(n) that returns "zero" for 0, and otherwise a two-word description: the sign ("positive" or "negative") followed by the parity ("even" or "odd"), separated by a space.

Examples

Input:  n = 4
Output: "positive even"

Input:  n = -3
Output: "negative odd"

Input:  n = 0
Output: "zero"

Constraints

  • -10**12 <= n <= 10**12 (integer)

Goals

  • Combine a sign test with a parity test
  • Build a string from two decisions
Starting Python…