bilingual-math-code-verification-v1 / code /math_code_013_solution.py
efe-T's picture
Upload folder using huggingface_hub
93237a0 verified
Raw History Blame Contribute Delete
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))