Datasets:
Download code/math_code_005_solution.py from efe-T/bilingual-math-code-verification-v1: direct link, hf CLI and curl.
- Browser
- Download file 326 Bytes
-
https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_005_solution.py
- Command line
-
hf download hf://datasets/efe-T/bilingual-math-code-verification-v1/code/math_code_005_solution.py
-
curl -L -o math_code_005_solution.py https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_005_solution.py
326 Bytes
| from math import sqrt | |
| x = 10 - 2 * sqrt(7) | |
| volume = x * (36 - 2 * x) * (24 - 2 * x) | |
| derivative = 864 - 240 * x + 12 * x * x | |
| assert 0 < x < 12 and abs(derivative) < 1e-8 | |
| assert volume > 0 | |
| result = {"cut_cm": round(x, 6), "volume_cm3": round(volume, 6)} | |
| import json | |
| print(json.dumps(result, ensure_ascii=False, sort_keys=True)) | |