input: Write a function to evaluate a numerical expression given as a string and return the result. If the input string is empty or invalid, raise a ValueError.
  assert eval_expr("2+3*4")==14
  assert eval_expr("10/2-1")==4
  assert eval_expr("5*6+3")==33
  assert eval_expr("2**3-4")==4
  assert raises_error(eval_expr, "")==True
  assert raises_error(eval_expr, "abc")==True
output: def eval_expr(expr):
      if not expr or not expr.strip():
          raise ValueError("Input string is empty or invalid")
      try:
          return eval(expr)
      except:
          raise ValueError("Input string is invalid")