from pathlib import Path
html = """
AQA A-Level Computer Science Grade Boundaries
AQA 7517
Grade Boundaries
A-Level Computer Science
Boundaries
Paper 1 values use the Python component. Component rows are raw-mark notional boundaries.
Total rows are final qualification boundaries out of 375 scaled marks.
There were no normal summer exam boundaries in 2020 or 2021.
Official AQA archive.
"""
path=Path("/mnt/data/aqa_cs_grade_boundaries_official.html")
path.write_text(html,encoding="utf-8")
# File-level checks to ensure only the intended webpage was written.
for forbidden in [
'path = Path(', 'assert len(', 'def filt(', 'print("Created',
'Independent edge-case tests', 'python_user_visible'
]:
assert forbidden not in html
# Verify every displayed year contains all four rows.
expected_years={2018,2019,2022,2023,2024,2025}
for year in expected_years:
for paper in ["Total","Paper 1","Paper 2","NEA"]:
marker=f'{{year:{year},paper:"{paper}"'
assert marker in html, f"Missing {year} {paper}"
assert path.exists()
print("Created clean website file.")
print("Verified all six years contain Total, Paper 1, Paper 2 and NEA rows.")
print("Verified no Python test or file-writing text is embedded in the webpage.")