gabejavitt commited on
Commit
1726a93
·
verified ·
1 Parent(s): ebe46d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1885,10 +1885,8 @@ def check_answer_correctness(submitted: str, correct: str) -> Tuple[bool, str]:
1885
  # Check if it's a number formatting issue
1886
  try:
1887
  # Try to parse as numbers
1888
- submitted_num = float(submitted_clean.replace(',', '').replace('
1889
- , ''))
1890
- correct_num = float(correct_clean.replace(',', '').replace('
1891
- , ''))
1892
  if abs(submitted_num - correct_num) < 0.01: # Allow small floating point differences
1893
  return True, "✅ MATCH (numeric equivalence)"
1894
  except (ValueError, AttributeError):
 
1885
  # Check if it's a number formatting issue
1886
  try:
1887
  # Try to parse as numbers
1888
+ submitted_num = float(submitted_clean.replace(',', '').replace('$', ''))
1889
+ correct_num = float(correct_clean.replace(',', '').replace('$', ''))
 
 
1890
  if abs(submitted_num - correct_num) < 0.01: # Allow small floating point differences
1891
  return True, "✅ MATCH (numeric equivalence)"
1892
  except (ValueError, AttributeError):