{ "question": "Craig has 2 twenty dollar bills. He buys six squirt guns for $2 each. He also buys 3 packs of water balloons for $3 each. How much money does he have left?", "answer": "Craig starts off with 2 * $20 = $<<2*20=40>>40.\nCraig spends 6 squirt guns * $2 = $<<6*2=12>>12 on squirt guns.\nCraig spends 3 packs of water balloons * $3 = $<<3*3=9>>9 on water balloons.\nTotal Craig has spent $12 + $9 = $<<12+9=21>>21.\nCraig has $40 - $21 = $<<40-21=19>>19 remaining.\n#### 19", "id_orig": 843, "id_shuffled": 52, "question_annotated": "{name,Craig} has {n,2} {cur,$}{bill,twenty} bills. He buys {m,six} {item1,squirt gun}s for {cur,$}{p1,2} each. He also buys {k,3} packs of {item2,water balloon}s for {cur,$}{p2,3} each. How much money does he have left, if he receives a {d1,10}% discount on the {item1,squirt guns} and a {d2,10}% on the {item2,water baloons}?\n\n#init:\n- name = sample(names_male)\n- $bill = sample([(5, 5), (10, 10), (20, 20), (50, 50), (100, 100)])\n- item1 = sample([\"toy car\", \"action figure\", \"coloring book\", \"puzzle\", \"board game\"])\n- item2 = sample([\"sticker\", \"candy bar\", \"trading card\", \"pencil\", \"eraser\"])\n- cur = sample(currencies_sym)\n- $n = range(1, 10)\n- $m = range(2, 15)\n- $k = range(1, 10)\n- $d1 = range(5, 26, 5)\n- $d2 = range(5, 26, 5)\n- $p1 = range(1, 10)\n- $p2 = range(1, 10)\n\n#conditions:\n- is_int((m * p1)*d1/100)\n- is_int((k* p2)*d2/100)\n- n * int(bill) > (m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100))\n\n#answer: int(n * int(bill) - ((m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100))))", "answer_annotated": "{name} starts off with {n} * {cur}{bill} = {cur}<<{n}*{int(bill)}={n*int(bill)}>>{n*int(bill)}.\n{name} spends {m} {item1}s * {cur}{p1} = {cur}<<{m}*{p1}={m*p1}>>{m*p1} on {item1}s. With {d1}% discount it will be {m*p1} - {m*p1} * {d1} % = {int(m*p1*(1-(d1/100)))}\n{name} spends {k} packs of {item2}s * {cur}{p2} = {cur}<<{k}*{p2}={k*p2}>>{k*p2} on {item2}s. With {d2}% discount it will be {k*p2} - {k*p2} * {d2}% = {int(k*p2*(1-(d2/100)))}.\nTotal {name} has spent {cur}{int(m*p1*(1-(d1/100)))} + {cur}{int(k*p2*(1-(d2/100)))} = {int((m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100)))}. \n{name} has {cur}{n*int(bill)} - {cur}{int((m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100)))} = {cur}<<{n*int(bill)}-{(m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100))}={int(n * int(bill) - ((m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100))))}>>{int(n * int(bill) - ((m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100))))} remaining.\n#### {int(n * int(bill) - ((m * p1)*(1-(d1/100))+ (k * p2)*(1-(d2/100))))}" }