============================================================
 FUNCTION FUNDAMENTALS -- REUSABLE UTILITIES - Demo Run
============================================================

--- is_prime ---
  is_prime(1) = False
  is_prime(2) = True
  is_prime(17) = True
  is_prime(18) = False
  is_prime(97) = True

--- gcd / lcm ---
  gcd(48, 18) = 6
  lcm(4, 6) = 12

--- celsius_range_table ---
  0 C = 32.0 F
  5 C = 41.0 F
  10 C = 50.0 F
  15 C = 59.0 F
  20 C = 68.0 F

--- Mutable default argument pitfall ---
  add_item_buggy('first') -> ['first', 'second']
  add_item_buggy('second') -> ['first', 'second']  <- BUG: 'first' leaked in! Same default list reused.
  add_item_fixed('first') -> ['first']
  add_item_fixed('second') -> ['second']  <- FIXED: independent lists each call

--- Positional + keyword-only arguments ---
  Maya is 29 years old and lives in Boston.
  Sam is 41 years old and lives in Unknown.

--- Multiple return values via tuple ---
  min_max([5,2,9,1,7]) -> min=1, max=9

============================================================
 Assignment: validate_and_convert
============================================================
  validate_and_convert('42', int, default=None) = 42
  validate_and_convert('not a number', int, default=-1) = -1
  validate_and_convert('3.14', float, default=None) = 3.14
  validate_and_convert('', int, default=0) = 0
