Asilarkness commited on
Commit
d13001c
·
verified ·
1 Parent(s): 26b1ed0

Upload tmpl_code/tc_tptest_1791578709_00001.jsonl with huggingface_hub

Browse files
tmpl_code/tc_tptest_1791578709_00001.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"tid": "0875e0e6e0", "cat": "science_calc", "code": "def make(rng, original=False):\n if original:\n tenths = 90\n mag = 50\n apparent = tenths * (mag // 10)\n question = (\n \"The wingspan of a Charaxes butterfly is approximately 9.0 cm. \"\n \"If a researcher uses a compound microscope with a total magnification of 50\u00d7 \"\n \"to observe wing scales, what is the apparent width of the wings in centimeters?\"\n )\n lines = [\n \"Apparent width = wingspan \u00d7 magnification\",\n f\"Apparent width = {tenths // 10}.{tenths % 10} cm \u00d7 {mag}\",\n f\"Apparent width = {apparent} cm\",\n ]\n return question, lines, f\"{apparent} cm\"\n\n names = [\"Charaxes\", \"Junonia\", \"Papilio\", \"Morpho\", \"Pieris\", \"Nymphalis\"]\n parts = [\"wing scales\", \"wing venation\", \"wing pattern\", \"wing margins\"]\n instruments = [\"compound microscope\", \"microscope\", \"stereo microscope\"]\n mags = [10, 20, 30, 40, 50, 60, 80, 100, 120, 150, 200]\n\n valid = []\n for t in range(30, 151):\n for m in mags:\n apparent = t * (m // 10)\n if 100 <= apparent <= 3000 and not (t == 90 and m == 50):\n valid.append((t, m))\n\n if not valid:\n return None\n\n tenths, mag = rng.choice(valid)\n apparent = tenths * (mag // 10)\n wingspan = f\"{tenths // 10}.{tenths % 10}\"\n name = rng.choice(names)\n part = rng.choice(parts)\n instrument = rng.choice(instruments)\n\n templates = [\n \"The wingspan of a {name} butterfly is approximately {wingspan} cm. \"\n \"If a researcher uses a {instrument} with a total magnification of {mag}\u00d7 \"\n \"to observe {part}, what is the apparent width of the wings in centimeters?\",\n \"A {name} butterfly has a wingspan of about {wingspan} cm. \"\n \"A {instrument} with total magnification {mag}\u00d7 is used to view {part}. \"\n \"What apparent width in centimeters will the wings have?\",\n \"If the wingspan of a {name} butterfly is {wingspan} cm and a {instrument} \"\n \"magnifies it by {mag}\u00d7 while examining {part}, what is the apparent width \"\n \"of the wings in centimeters?\",\n ]\n\n question = rng.choice(templates).format(\n name=name,\n wingspan=wingspan,\n mag=mag,\n part=part,\n instrument=instrument,\n )\n\n lines = [\n \"Apparent width = wingspan \u00d7 magnification\",\n f\"Apparent width = {wingspan} cm \u00d7 {mag}\",\n f\"Apparent width = {apparent} cm\",\n ]\n\n return question, lines, f\"{apparent} cm\"\n"}