Datasets:
Download code/math_code_013_solution.py from efe-T/bilingual-math-code-verification-v1: direct link, hf CLI and curl.
- Browser
- Download file 282 Bytes
-
https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_013_solution.py
- Command line
-
hf download hf://datasets/efe-T/bilingual-math-code-verification-v1/code/math_code_013_solution.py
-
curl -L -o math_code_013_solution.py https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_013_solution.py
282 Bytes
| from fractions import Fraction | |
| fence = Fraction(120) | |
| x = fence / 4 | |
| y = fence - 2 * x | |
| area = x * y | |
| assert 2 * x + y == fence and x >= 0 and y >= 0 | |
| result = {"x_m": str(x), "y_m": str(y), "area_m2": str(area)} | |
| import json | |
| print(json.dumps(result, ensure_ascii=False, sort_keys=True)) | |