"""Task graders returning strict (0, 1) scores.""" from typing import Any def _bounded_exact_match(prediction: Any, expected: Any) -> float: pred = str(prediction or "").strip().lower() exp = str(expected or "").strip().lower() return 0.99 if pred == exp and exp else 0.01 def grade_find_ssl_config(prediction: Any, expected: Any) -> float: return _bounded_exact_match(prediction, expected) def grade_find_postgres_setup(prediction: Any, expected: Any) -> float: return _bounded_exact_match(prediction, expected) def grade_find_oauth_guide(prediction: Any, expected: Any) -> float: return _bounded_exact_match(prediction, expected)