title: Check If A Number Is Jumbled Or Not
signature: function check_if_a_number_is_jumbled_or_not(num)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(num, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(num), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(67, true);
      @printf("TEST-0...%s\n",result);
      
      result = driver(77, true);
      @printf("TEST-1...%s\n",result);
      
      result = driver(35, false);
      @printf("TEST-2...%s\n",result);
      
      result = driver(79, false);
      @printf("TEST-3...%s\n",result);
      
      result = driver(45, true);
      @printf("TEST-4...%s\n",result);
      
      result = driver(22, true);
      @printf("TEST-5...%s\n",result);
      
      result = driver(68, false);
      @printf("TEST-6...%s\n",result);
      
      result = driver(17, false);
      @printf("TEST-7...%s\n",result);
      
      result = driver(5, true);
      @printf("TEST-8...%s\n",result);
      
      result = driver(85, false);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def check_if_a_number_is_jumbled_or_not(num):
      if ((num // 10) == 0):
          return True
      while (num != 0):
          if ((num // 10) == 0):
              return True
          digit1 = (num % 10)
          digit2 = ((num // 10) % 10)
          if (abs((digit2 - digit1)) > 1):
              return False
          num = (num // 10)
      return True
source_cpp: bool check_if_a_number_is_jumbled_or_not(int num) {
    if ( num / 10 == 0 ) return true;
    while ( num != 0 ) {
      if ( num / 10 == 0 ) return true;
      int digit1 = num % 10;
      int digit2 = ( num / 10 ) % 10;
      if ( abs ( digit2 - digit1 ) > 1 ) return false;
      num = num / 10;
    }
    return true;
  }