id stringlengths 23 26 | text stringlengths 20 1.37k | format stringclasses 2
values | messages listlengths 2 4 ⌀ | family stringclasses 1
value | sub stringclasses 3
values | variant stringclasses 1
value | variant_of stringclasses 0
values | generator stringclasses 1
value | sources listlengths 0 0 | source_ids listlengths 0 0 | n_tokens_alea int64 8 494 | meta stringlengths 47 170 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
nlprog_det-setting-0050438 | Uma lends $2,500 at 6% simple interest per year for 4 years. How much interest is earned?
Python code:
```python
principal = 2500
rate = 6 / 100
years = 4
interest = principal * rate * years
print(f"{interest:.2f}")
```
When run, it prints 600.00.
The interest is $600.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "600.00", "printed": "600.00", "notation": null} |
nlprog_det-setting-0050439 | 21 of 25 members attended. What percent attended?
Python code:
```python
present = 21
total = 25
percent = present / total * 100
print(round(percent, 1))
```
Printed = 84.0
Attendance was 84.0%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 77 | {"gold": "84.0", "printed": "84.0", "notation": null} |
nlprog_det-setting-0050441 | <|start|><|user|>
With 30% off, what does a $300 kettle cost?<|eot|>
<|assistant|>
```python
price = 300
discount = 30 / 100 # 0.3
sale_price = price * (1 - discount) # 210.0
print(f"{sale_price:.2f}")
```
(Console output: 210.00)
The sale price is $210.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "With 30% off, what does a $300 kettle cost?"
},
{
"role": "assistant",
"content": "```python\nprice = 300\ndiscount = 30 / 100 # 0.3\nsale_price = price * (1 - discount) # 210.0\nprint(f\"{sale_price:.2f}\")\n```\n(Console output: 210.00)\n\nThe sale price is $210... | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "210.00", "printed": "210.00", "notation": null} |
nlprog_det-setting-0050442 | A shift runs from 9:11 AM to 10:24 AM. How long is it in minutes?
Code:
```python
start = 9 * 60 + 11 # 551
end = 10 * 60 + 24 # 624
print(end - start)
```
Out: 73
73 minutes pass. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 79 | {"gold": "73", "printed": "73", "notation": null} |
nlprog_det-setting-0050443 | <|start|><|system|>
Show working only when it helps.<|eot|>
<|user|>
Revenue is $10,000 and costs are $8,000. What is the profit margin as a percent of revenue (one decimal)?<|eot|>
<|assistant|>
```python
revenue = 10000
costs = 8000
profit = revenue - costs # 2000
margin = profit / revenue * 100 # 20.0
print(round(... | chat | [
{
"role": "system",
"content": "Show working only when it helps."
},
{
"role": "user",
"content": "Revenue is $10,000 and costs are $8,000. What is the profit margin as a percent of revenue (one decimal)?"
},
{
"role": "assistant",
"content": "```python\nrevenue = 10000\ncosts = 8000... | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "20.0", "printed": "20.0", "notation": null} |
nlprog_det-setting-0050446 | A client paid a $2,500 retainer. The firm has billed 13 hours at $150 per hour. How much of the retainer is left?
The program:
```python
retainer = 2500
hours = 13
rate = 150
left = retainer - hours * rate # 550
print(left)
```
# console output: 550
The remaining balance is $550. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "550", "printed": "550", "notation": null} |
nlprog_det-setting-0050447 | Count 10 days forward from April 12, 2028. What date is that?
The program:
```python
from datetime import date, timedelta
start = date(2028, 4, 12) # datetime.date(2028, 4, 12)
end = start + timedelta(days=10) # datetime.date(2028, 4, 22)
print(end.isoformat())
```
Printed result: 2028-04-22
That date is April 22, ... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 138 | {"gold": "2028-04-22", "printed": "2028-04-22", "notation": null} |
nlprog_det-setting-0050448 | The landlord deducts $75 from a $800 deposit. What is returned to the tenant?
The computation:
```python
deposit = 800
deductions = [75]
refund = deposit - sum(deductions) # 725
print(refund)
```
Printed result: 725
$725 is returned. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "725", "printed": "725", "notation": null} |
nlprog_det-setting-0050449 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
[{"name": "sandbox_python", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "object", "properties": {"snippet": {"type": "string", "description": "Python source code"}}, "required": ["snippet"]}}, {"name": "busin... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n[{\"name\": \"sandbox_python\", \"description\": \"A Python interpreter. Returns standard output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"snippet\": {\"type\": \"string\", \"description\": \"Python source c... | nlprog_det | setting | original | null | deterministic | [] | [] | 317 | {"gold": "720", "printed": "720", "notation": null} |
nlprog_det-setting-0050451 | <|start|><|user|>
Pay is $22.40/hour, with overtime at 1.5 times that rate beyond 40 hours. How much for 44 hours?<|eot|>
<|assistant|>
Eamon earns $1,030.40.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Pay is $22.40/hour, with overtime at 1.5 times that rate beyond 40 hours. How much for 44 hours?"
},
{
"role": "assistant",
"content": "Eamon earns $1,030.40."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 54 | {"gold": "1030.40", "printed": "1030.40", "notation": null} |
nlprog_det-setting-0050452 | <|start|><|user|>
After an initial $6,000, the remainder of a $48,000 grant is paid in 4 equal parts. What is each part?<|eot|>
<|assistant|>
$10,500.00 per installment.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "After an initial $6,000, the remainder of a $48,000 grant is paid in 4 equal parts. What is each part?"
},
{
"role": "assistant",
"content": "$10,500.00 per installment."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 48 | {"gold": "10500.00", "printed": "10500.00", "notation": null} |
nlprog_det-setting-0050453 | At 30 miles per hour, how many minutes does a 110-mile trip take?
Here's the code.
```python
distance = 110
speed = 30
minutes = distance / speed * 60 # 220.0
print(round(minutes))
```
(Result: 220)
220 minutes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 84 | {"gold": "220", "printed": "220", "notation": null} |
nlprog_det-setting-0050454 | <|start|><|user|>
Chen drove 489 miles for work. Mileage is reimbursed at 67 cents a mile. How much is the reimbursement?<|eot|>
<|assistant|>
```python
miles = 489
rate = 0.67
reimbursement = miles * rate # 327.63
print(f"{reimbursement:.2f}")
```
stdout — 327.63
Chen is owed $327.63.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Chen drove 489 miles for work. Mileage is reimbursed at 67 cents a mile. How much is the reimbursement?"
},
{
"role": "assistant",
"content": "```python\nmiles = 489\nrate = 0.67\nreimbursement = miles * rate # 327.63\nprint(f\"{reimbursement:.2f}\")\n```\nstdout —... | nlprog_det | setting | original | null | deterministic | [] | [] | 114 | {"gold": "327.63", "printed": "327.63", "notation": null} |
nlprog_det-setting-0050455 | A desk lamp costs $80. It is 40% off. What is the sale price?
Programmatically:
price = 80
discount = 40 / 100 # 0.4
sale_price = price * (1 - discount) # 48.0
print(f"{sale_price:.2f}")
(Execution result: 48.00)
It costs $48.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "48.00", "printed": "48.00", "notation": null} |
nlprog_det-setting-0050456 | Straight-line depreciation: cost $45,000, salvage $2,000, 10 years. How much per year?
Python makes this quick:
```python
cost = 45000
salvage = 2000
years = 10
per_year = (cost - salvage) / years # 4300.0
print(f"{per_year:.2f}")
```
(Printed: 4300.00)
Depreciation is $4,300.00 per year. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 131 | {"gold": "4300.00", "printed": "4300.00", "notation": null} |
nlprog_det-setting-0050458 | 3 boxes hold 8 chairs each. After 12 are handed out, how many are left?
A few lines of Python do it:
```python
boxes = 3
per_box = 8
given_away = 12
left = boxes * per_box - given_away # 12
print(left)
```
Run it and it prints 12.
That leaves 12 chairs. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "12", "printed": "12", "notation": null} |
nlprog_det-setting-0050459 | <|start|><|user|>
With $20,000 in costs and $24,000 in revenue, what percent of revenue is profit? Round to one decimal.<|eot|>
<|assistant|>
```python
revenue = 24000
costs = 20000
profit = revenue - costs # 4000
margin = profit / revenue * 100 # 16.666666666666664
print(round(margin, 1))
```
(Execution result: 16.7... | chat | [
{
"role": "user",
"content": "With $20,000 in costs and $24,000 in revenue, what percent of revenue is profit? Round to one decimal."
},
{
"role": "assistant",
"content": "```python\nrevenue = 24000\ncosts = 20000\nprofit = revenue - costs # 4000\nmargin = profit / revenue * 100 # 16.666666666... | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "16.7", "printed": "16.7", "notation": null} |
nlprog_det-setting-0050460 | 6 walks at 400 calories each burn how many calories in total?
Computation in Python:
```python
per_session = 400
sessions = 6
total = per_session * sessions # 2400
print(total)
```
Program output: 2400
That burns 2400 calories. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "2400", "printed": "2400", "notation": null} |
nlprog_det-setting-0050461 | Pilar earns $25.00 an hour and time and a half for hours over 40. What is the pay for a 52-hour week?
A few lines of Python do it:
```python
rate = 25.0
hours = 52
regular = 40 * rate # 1000.0
overtime = (hours - 40) * rate * 1.5 # 450.0
pay = regular + overtime # 1450.0
print(f"{pay:.2f}")
```
Console output: 1450... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 149 | {"gold": "1450.00", "printed": "1450.00", "notation": null} |
nlprog_det-setting-0050462 | <|start|><|user|>
Convert 57.1 km to meters.<|eot|>
<|assistant|>
```python
km = 57.1
meters = km * 1000
print(round(meters))
```
Output = 57100
That is 57,100 meters.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert 57.1 km to meters."
},
{
"role": "assistant",
"content": "```python\nkm = 57.1\nmeters = km * 1000\nprint(round(meters))\n```\nOutput = 57100\n\nThat is 57,100 meters."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 73 | {"gold": "57100", "printed": "57100", "notation": null} |
nlprog_det-setting-0050464 | Parking is $2 per hour with a daily maximum of $24. What do 5 hours cost?
Python does the arithmetic:
```python
rate = 2
hours = 5
daily_max = 24
cost = min(rate * hours, daily_max) # 10
print(cost)
```
Result: 10
The charge is $10. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "10", "printed": "10", "notation": null} |
nlprog_det-setting-0050465 | 6 swims at 250 calories each burn how many calories in total?
Set it up in Python:
```python
per_session = 250
sessions = 6
total = per_session * sessions # 1500
print(total)
```
Run it and it prints 1500.
1500 calories in total. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "1500", "printed": "1500", "notation": null} |
nlprog_det-setting-0050466 | <|start|><|user|>
Fixed costs are $1,200. Each unit sells for $15 and costs $5 to make. How many units must be sold to break even?<|eot|>
<|assistant|>
```python
import math
fixed = 1200
price = 15
variable = 5
units = math.ceil(fixed / (price - variable)) # 120
print(units)
```
# printed: 120
Break-even is 120 units... | chat | [
{
"role": "user",
"content": "Fixed costs are $1,200. Each unit sells for $15 and costs $5 to make. How many units must be sold to break even?"
},
{
"role": "assistant",
"content": "```python\nimport math\nfixed = 1200\nprice = 15\nvariable = 5\nunits = math.ceil(fixed / (price - variable)) # 1... | nlprog_det | setting | original | null | deterministic | [] | [] | 114 | {"gold": "120", "printed": "120", "notation": null} |
nlprog_det-setting-0050467 | At a 5% tax rate, what is the tax on $330.37?
Set it up in Python:
```python
price = 330.37
tax_rate = 5 / 100 # 0.05
tax = price * tax_rate # 16.5185
print(f"{tax:.2f}")
```
Output:
16.52
$16.52 in tax. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 108 | {"gold": "16.52", "printed": "16.52", "notation": null} |
nlprog_det-setting-0050468 | Convert 1,086 USD to CAD at 1 USD = 1.31 CAD.
Python:
```python
amount = 1086
rate = 1.31
converted = amount * rate # 1422.66
print(f"{converted:.2f}")
```
On running, it outputs: 1422.66
That is 1,422.66 CAD. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "1422.66", "printed": "1422.66", "notation": null} |
nlprog_det-setting-0050469 | A garage charges $4 an hour, never more than $15 a day. How much for 7 hours?
Python code:
rate = 4
hours = 7
daily_max = 15
cost = min(rate * hours, daily_max) # 15
print(cost)
Python prints 15, as expected.
The charge is $15. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "15", "printed": "15", "notation": null} |
nlprog_det-setting-0050470 | An unpaid balance of $12,000 accrues 1.5% simple interest per month. How much interest accrues in 2 months?
```python
balance = 12000
monthly_rate = 1.5 / 100 # 0.015
months = 2
interest = balance * monthly_rate * months # 360.0
print(f"{interest:.2f}")
```
Run output — 360.00
The interest is $360.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 121 | {"gold": "360.00", "printed": "360.00", "notation": null} |
nlprog_det-setting-0050471 | Revenue is $13,000 and costs are $12,500. What is the profit margin as a percent of revenue (one decimal)?
Here is the program.
```python
revenue = 13000
costs = 12500
profit = revenue - costs # 500
margin = profit / revenue * 100 # 3.8461538461538463
print(round(margin, 1))
```
Execution prints 3.8.
Profit is 3.8%... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 127 | {"gold": "3.8", "printed": "3.8", "notation": null} |
nlprog_det-setting-0050472 | A pack of 20 markers sells for $800. What does each cost?
Code:
```python
total = 800
count = 20
per_item = total // count # 40
print(per_item)
```
# console output: 40
The unit price is $40. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 81 | {"gold": "40", "printed": "40", "notation": null} |
nlprog_det-setting-0050473 | Shipping costs $8 plus $0.75 per pound. What does a 28-pound parcel cost to ship?
One way, in code:
```python
base = 8
per_pound = 0.75
weight = 28
cost = base + per_pound * weight # 29.0
print(f"{cost:.2f}")
```
The script prints 29.00.
Shipping costs $29.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "29.00", "printed": "29.00", "notation": null} |
nlprog_det-setting-0050474 | A $96 dinner bill gets a 15% tip, and 4 people share the cost equally. What is each person's share?
A Python solution:
```python
bill = 96
tip_rate = 15 / 100 # 0.15
people = 4
each = bill * (1 + tip_rate) / people # 27.599999999999998
print(f"{each:.2f}")
```
It prints: 27.60
Each person pays $27.60. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 131 | {"gold": "27.60", "printed": "27.60", "notation": null} |
nlprog_det-setting-0050476 | <|start|><|user|>
What is 0 degrees Celsius in Fahrenheit?<|eot|>
<|assistant|>
```python
celsius = 0
fahrenheit = celsius * 9 / 5 + 32 # 32.0
print(round(fahrenheit))
```
What it prints — 32
It equals 32 degrees Fahrenheit.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What is 0 degrees Celsius in Fahrenheit?"
},
{
"role": "assistant",
"content": "```python\ncelsius = 0\nfahrenheit = celsius * 9 / 5 + 32 # 32.0\nprint(round(fahrenheit))\n```\nWhat it prints — 32\n\nIt equals 32 degrees Fahrenheit."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "32", "printed": "32", "notation": null} |
nlprog_det-setting-0050477 | <|start|><|user|>
One can of paint covers 300 square feet. How many cans are needed for 915 square feet of wall?<|eot|>
<|assistant|>
```python
import math
area = 915
coverage = 300
cans = math.ceil(area / coverage) # 4
print(cans)
```
When run, it prints 4.
4 cans are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "One can of paint covers 300 square feet. How many cans are needed for 915 square feet of wall?"
},
{
"role": "assistant",
"content": "```python\nimport math\narea = 915\ncoverage = 300\ncans = math.ceil(area / coverage) # 4\nprint(cans)\n```\nWhen run, it prints 4.... | nlprog_det | setting | original | null | deterministic | [] | [] | 99 | {"gold": "4", "printed": "4", "notation": null} |
nlprog_det-setting-0050478 | A lawyer's fee is 30% of a $90,000 recovery. How large is the fee?
Computation in Python:
```python
recovery = 90000
rate = 30 / 100 # 0.3
fee = recovery * rate # 27000.0
print(f"{fee:.2f}")
```
Executing it gives 27000.00, as expected.
The lawyer's fee comes to $27,000.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 120 | {"gold": "27000.00", "printed": "27000.00", "notation": null} |
nlprog_det-setting-0050479 | <|start|><|user|>
Monthly: $15. Annual: $150. What is saved per year by paying annually?<|eot|>
<|assistant|>
```python
monthly = 15
yearly = 150
savings = monthly * 12 - yearly # 30
print(savings)
```
The interpreter prints: 30
$30 is saved.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Monthly: $15. Annual: $150. What is saved per year by paying annually?"
},
{
"role": "assistant",
"content": "```python\nmonthly = 15\nyearly = 150\nsavings = monthly * 12 - yearly # 30\nprint(savings)\n```\nThe interpreter prints: 30\n\n$30 is saved."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "30", "printed": "30", "notation": null} |
nlprog_det-setting-0050480 | <|start|><|user|>
Printing costs 12 cents a page. What does it cost to print 178 copies of a 44-page handout?<|eot|>
<|assistant|>
pages = 44
copies = 178
cost_per_page = 0.12
cost = pages * copies * cost_per_page # 939.8399999999999
print(f"{cost:.2f}")
The program prints: 939.84
Printing costs $... | chat | [
{
"role": "user",
"content": "Printing costs 12 cents a page. What does it cost to print 178 copies of a 44-page handout?"
},
{
"role": "assistant",
"content": " pages = 44\n copies = 178\n cost_per_page = 0.12\n cost = pages * copies * cost_per_page # 939.8399999999999\n print(f... | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "939.84", "printed": "939.84", "notation": null} |
nlprog_det-setting-0050481 | Find the mean of these test scores: 78, 67, 76, 91 and 78.
Here is a short program for it.
```python
scores = [78, 67, 76, 91, 78]
average = sum(scores) // len(scores) # 78
print(average)
```
Executed, it shows 78.
The average score is 78. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "78", "printed": "78", "notation": null} |
nlprog_det-setting-0050482 | <|start|><|user|>
What is 0 degrees Celsius in Fahrenheit?<|eot|>
<|assistant|>
It equals 32 degrees Fahrenheit.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What is 0 degrees Celsius in Fahrenheit?"
},
{
"role": "assistant",
"content": "It equals 32 degrees Fahrenheit."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 36 | {"gold": "32", "printed": "32", "notation": null} |
nlprog_det-setting-0050483 | Shipping costs $10 plus $2.00 per pound. What does a 36-pound parcel cost to ship?
Python makes this quick:
```python
base = 10
per_pound = 2.0
weight = 36
cost = base + per_pound * weight # 82.0
print(f"{cost:.2f}")
```
Program output — 82.00
Shipping costs $82.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "82.00", "printed": "82.00", "notation": null} |
nlprog_det-setting-0050484 | <|start|><|user|>
A meal costs $22.40. How much is a 20% tip?<|eot|>
<|assistant|>
bill = 22.4
tip_rate = 20 / 100 # 0.2
tip = bill * tip_rate # 4.4799999999999995
print(f"{tip:.2f}")
Printed: 4.48
The tip is $4.48.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A meal costs $22.40. How much is a 20% tip?"
},
{
"role": "assistant",
"content": " bill = 22.4\n tip_rate = 20 / 100 # 0.2\n tip = bill * tip_rate # 4.4799999999999995\n print(f\"{tip:.2f}\")\nPrinted: 4.48\n\nThe tip is $4.48."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "4.48", "printed": "4.48", "notation": null} |
nlprog_det-setting-0050486 | <|start|><|user|>
An invoice lists 12 notebooks at $8 each, plus 8% sales tax. What is the invoice total?<|eot|>
<|assistant|>
```python
quantity = 12
unit_price = 8
subtotal = quantity * unit_price # 96
total = subtotal * (1 + 8 / 100) # 103.68
print(f"{total:.2f}")
```
Executed, it shows: 103.68
The invoice total ... | chat | [
{
"role": "user",
"content": "An invoice lists 12 notebooks at $8 each, plus 8% sales tax. What is the invoice total?"
},
{
"role": "assistant",
"content": "```python\nquantity = 12\nunit_price = 8\nsubtotal = quantity * unit_price # 96\ntotal = subtotal * (1 + 8 / 100) # 103.68\nprint(f\"{tot... | nlprog_det | setting | original | null | deterministic | [] | [] | 132 | {"gold": "103.68", "printed": "103.68", "notation": null} |
nlprog_det-setting-0050487 | <|start|><|user|>
Count 90 days forward from February 3, 2019. What date is that?<|eot|>
<|assistant|>
```python
from datetime import date, timedelta
start = date(2019, 2, 3) # datetime.date(2019, 2, 3)
end = start + timedelta(days=90) # datetime.date(2019, 5, 4)
print(end.isoformat())
```
The program outputs: 2019-0... | chat | [
{
"role": "user",
"content": "Count 90 days forward from February 3, 2019. What date is that?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date, timedelta\nstart = date(2019, 2, 3) # datetime.date(2019, 2, 3)\nend = start + timedelta(days=90) # datetime.date(2019, 5, ... | nlprog_det | setting | original | null | deterministic | [] | [] | 136 | {"gold": "2019-05-04", "printed": "2019-05-04", "notation": null} |
nlprog_det-setting-0050488 | <|start|><|user|>
A bicycle helmet costs $250. It is 25% off. What is the sale price?<|eot|>
<|assistant|>
```python
price = 250
discount = 25 / 100 # 0.25
sale_price = price * (1 - discount) # 187.5
print(f"{sale_price:.2f}")
```
Printed — 187.50
The sale price is $187.50.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A bicycle helmet costs $250. It is 25% off. What is the sale price?"
},
{
"role": "assistant",
"content": "```python\nprice = 250\ndiscount = 25 / 100 # 0.25\nsale_price = price * (1 - discount) # 187.5\nprint(f\"{sale_price:.2f}\")\n```\nPrinted — 187.50\n\nThe s... | nlprog_det | setting | original | null | deterministic | [] | [] | 114 | {"gold": "187.50", "printed": "187.50", "notation": null} |
nlprog_det-setting-0050489 | Which is cheaper per unit: 12 for $5.97 (A) or 18 for $12.90 (B)?
Let the code do the arithmetic:
```python
pack_a = 5.97 / 12 # 0.4975
pack_b = 12.9 / 18 # 0.7166666666666667
cheaper = "A" if pack_a < pack_b else "B" # 'A'
print(cheaper)
```
stdout = A
Pack A is cheaper per item. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 138 | {"gold": "A", "printed": "A", "notation": null} |
nlprog_det-setting-0050490 | Emeka has 5 documents to file, and each filing costs $350. How much are the filing fees in total?
Let's compute it with Python.
```python
fee = 350
filings = 5
total = fee * filings # 1750
print(total)
```
Running it prints 1750, as expected.
The filings cost $1,750 in all. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 104 | {"gold": "1750", "printed": "1750", "notation": null} |
nlprog_det-setting-0050491 | An unpaid balance of $1,000 accrues 2% simple interest per month. How much interest accrues in 6 months?
Python makes this quick:
```python
balance = 1000
monthly_rate = 2 / 100 # 0.02
months = 6
interest = balance * monthly_rate * months # 120.0
print(f"{interest:.2f}")
```
# output: 120.00
$120.00 accrues. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 120 | {"gold": "120.00", "printed": "120.00", "notation": null} |
nlprog_det-setting-0050492 | <|start|><|user|>
A $2,500 security deposit has deductions of $120. How much is refunded?<|eot|>
<|assistant|>
```python
deposit = 2500
deductions = [120]
refund = deposit - sum(deductions) # 2380
print(refund)
```
When run, it prints 2380.
The refund is $2,380.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A $2,500 security deposit has deductions of $120. How much is refunded?"
},
{
"role": "assistant",
"content": "```python\ndeposit = 2500\ndeductions = [120]\nrefund = deposit - sum(deductions) # 2380\nprint(refund)\n```\nWhen run, it prints 2380.\n\nThe refund is $... | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "2380", "printed": "2380", "notation": null} |
nlprog_det-setting-0050493 | Scale 300 g of rice from 2 servings to 8 servings.
Set it up in Python:
grams = 300
serves = 2
needed_for = 8
scaled = grams * needed_for // serves # 1200
print(scaled)
The program prints: 1200
1200 grams of rice are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "1200", "printed": "1200", "notation": null} |
nlprog_det-setting-0050494 | 78 copies of a 60-page packet are printed at $0.05 per page. What is the cost?
Let's compute it with Python.
```python
pages = 60
copies = 78
cost_per_page = 0.05
cost = pages * copies * cost_per_page # 234.0
print(f"{cost:.2f}")
```
Running this gives: 234.00
The job costs $234.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 124 | {"gold": "234.00", "printed": "234.00", "notation": null} |
nlprog_det-setting-0050495 | <|start|><|user|>
From a $2,500 retainer, 5 hours at $250/hour have been drawn. What remains?<|eot|>
<|assistant|>
```python
retainer = 2500
hours = 5
rate = 250
left = retainer - hours * rate # 1250
print(left)
```
The run gives 1250.
The remaining balance is $1,250.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "From a $2,500 retainer, 5 hours at $250/hour have been drawn. What remains?"
},
{
"role": "assistant",
"content": "```python\nretainer = 2500\nhours = 5\nrate = 250\nleft = retainer - hours * rate # 1250\nprint(left)\n```\nThe run gives 1250.\n\nThe remaining balan... | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "1250", "printed": "1250", "notation": null} |
nlprog_det-setting-0050497 | A 220-page report must be reviewed in 4 days. How many pages a day is that, evenly?
The computation:
pages = 220
days = 4
per_day = pages // days # 55
print(per_day)
(Console output: 55)
That is 55 pages per day. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 76 | {"gold": "55", "printed": "55", "notation": null} |
nlprog_det-setting-0050498 | <|start|><|user|>
Printing costs 5 cents a page. What does it cost to print 61 copies of a 10-page handout?<|eot|>
<|assistant|>
```python
pages = 10
copies = 61
cost_per_page = 0.05
cost = pages * copies * cost_per_page
print(f"{cost:.2f}")
```
When run, it prints 30.50, as expected.
The job costs $30.50.<|eot|>
<|en... | chat | [
{
"role": "user",
"content": "Printing costs 5 cents a page. What does it cost to print 61 copies of a 10-page handout?"
},
{
"role": "assistant",
"content": "```python\npages = 10\ncopies = 61\ncost_per_page = 0.05\ncost = pages * copies * cost_per_page\nprint(f\"{cost:.2f}\")\n```\nWhen run, i... | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "30.50", "printed": "30.50", "notation": null} |
nlprog_det-setting-0050499 | 11 boxes hold 6 pens each. After 11 are handed out, how many are left?
Programmatically:
```python
boxes = 11
per_box = 6
given_away = 11
left = boxes * per_box - given_away
print(left)
```
It prints: 55
That leaves 55 pens. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "55", "printed": "55", "notation": null} |
nlprog_det-setting-0050500 | Someone born September 19, 2000 turns how old by January 26, 2030? Give the age in whole years.
The Python version:
```python
from datetime import date
born = date(2000, 9, 19) # datetime.date(2000, 9, 19)
on = date(2030, 1, 26) # datetime.date(2030, 1, 26)
age = on.year - born.year - ((on.month, on.day) < (born.mon... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 158 | {"gold": "29", "printed": "29", "notation": null} |
nlprog_det-setting-0050501 | A storeroom has 1789 ink cartridges. The office uses 9 a day. How many are left after 7 days?
As a program:
```python
stock = 1789
per_day = 9
days = 7
left = stock - per_day * days # 1726
print(left)
```
This prints 1726, as expected.
1726 remain. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "1726", "printed": "1726", "notation": null} |
nlprog_det-setting-0050502 | What percentage of $8,000 is $2,200?
Here's the code.
```python
budget = 8000
spent = 2200
percent = spent / budget * 100 # 27.500000000000004
print(round(percent, 1))
```
(Printed: 27.5)
That is 27.5% of the budget. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "27.5", "printed": "27.5", "notation": null} |
nlprog_det-setting-0050503 | An unpaid balance of $4,000 accrues 2% simple interest per month. How much interest accrues in 4 months?
In code:
```python
balance = 4000
monthly_rate = 2 / 100 # 0.02
months = 4
interest = balance * monthly_rate * months # 320.0
print(f"{interest:.2f}")
```
What it prints: 320.00
The interest is $320.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 121 | {"gold": "320.00", "printed": "320.00", "notation": null} |
nlprog_det-setting-0050504 | Divide 202 items among 8 groups as evenly as possible with equal groups. How many per group, and how many remain?
Written as code:
```python
total = 202
groups = 8
per_group, remainder = divmod(total, groups)
print(f"{per_group} each, {remainder} left over")
```
The code prints 25 each, 2 left over.
25 each, 2 left o... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "25 each, 2 left over", "printed": "25 each, 2 left over", "notation": null} |
nlprog_det-setting-0050505 | <|start|><|user|>
From 2008 to 2044, how many years is that?<|eot|>
<|assistant|>
```python
start_year = 2008
end_year = 2044
print(end_year - start_year)
```
# console output: 36
That is 36 years.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "From 2008 to 2044, how many years is that?"
},
{
"role": "assistant",
"content": "```python\nstart_year = 2008\nend_year = 2044\nprint(end_year - start_year)\n```\n# console output: 36\n\nThat is 36 years."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 71 | {"gold": "36", "printed": "36", "notation": null} |
nlprog_det-setting-0050506 | <|start|><|user|>
Straight-line depreciation: cost $12,000, salvage $3,000, 8 years. How much per year?<|eot|>
<|assistant|>
$1,125.00 a year.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Straight-line depreciation: cost $12,000, salvage $3,000, 8 years. How much per year?"
},
{
"role": "assistant",
"content": "$1,125.00 a year."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 50 | {"gold": "1125.00", "printed": "1125.00", "notation": null} |
nlprog_det-setting-0050507 | <|start|><|system|>
You have access to these functions:
{"name": "py_exec", "description": "Executes a Python program and returns its output.", "parameters": {"type": "object", "properties": {"code": {"type": "string", "description": "Python source code"}}, "required": ["code"]}}<|eot|>
<|user|>
How many minutes pass f... | chat | [
{
"role": "system",
"content": "You have access to these functions:\n{\"name\": \"py_exec\", \"description\": \"Executes a Python program and returns its output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\... | nlprog_det | setting | original | null | deterministic | [] | [] | 198 | {"gold": "246", "printed": "246", "notation": null} |
nlprog_det-setting-0050508 | To read 210 pages in 7 days, how many pages per day are needed?
```python
pages = 210
days = 7
per_day = pages // days # 30
print(per_day)
```
Program output: 30
30 pages a day. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 71 | {"gold": "30", "printed": "30", "notation": null} |
nlprog_det-setting-0050509 | Counting the first and last day, how many days are there from May 10, 2020 through May 31, 2020?
In Python:
```python
from datetime import date
first = date(2020, 5, 10) # datetime.date(2020, 5, 10)
last = date(2020, 5, 31) # datetime.date(2020, 5, 31)
days = (last - first).days + 1 # 22
print(days)
```
Output of t... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 139 | {"gold": "22", "printed": "22", "notation": null} |
nlprog_det-setting-0050510 | <|start|><|user|>
Monthly: $15. Annual: $144. What is saved per year by paying annually?<|eot|>
<|assistant|>
monthly = 15
yearly = 144
savings = monthly * 12 - yearly # 36
print(savings)
stdout:
36
The annual plan saves $36.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Monthly: $15. Annual: $144. What is saved per year by paying annually?"
},
{
"role": "assistant",
"content": " monthly = 15\n yearly = 144\n savings = monthly * 12 - yearly # 36\n print(savings)\nstdout:\n36\n\nThe annual plan saves $36."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 78 | {"gold": "36", "printed": "36", "notation": null} |
nlprog_det-setting-0050512 | <|start|><|user|>
Copies cost $5 plus $0.50 for each page beyond 0. How much for 7 pages?<|eot|>
<|assistant|>
```python
pages = 7
base = 5
per_page = 0.5
free_pages = 0
cost = base + max(0, pages - free_pages) * per_page # 8.5
print(f"{cost:.2f}")
```
When run, it prints: 8.50
The copy costs $8.50.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Copies cost $5 plus $0.50 for each page beyond 0. How much for 7 pages?"
},
{
"role": "assistant",
"content": "```python\npages = 7\nbase = 5\nper_page = 0.5\nfree_pages = 0\ncost = base + max(0, pages - free_pages) * per_page # 8.5\nprint(f\"{cost:.2f}\")\n```\nWh... | nlprog_det | setting | original | null | deterministic | [] | [] | 127 | {"gold": "8.50", "printed": "8.50", "notation": null} |
nlprog_det-setting-0050513 | <|start|><|system|>
You are a logic tutor.<|eot|>
<|user|>
A 40 lb package ships at $10 base plus $1.20/lb. What is the charge?<|eot|>
<|assistant|>
```python
base = 10
per_pound = 1.2
weight = 40
cost = base + per_pound * weight # 58.0
print(f"{cost:.2f}")
```
Out — 58.00
The charge is $58.00.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a logic tutor."
},
{
"role": "user",
"content": "A 40 lb package ships at $10 base plus $1.20/lb. What is the charge?"
},
{
"role": "assistant",
"content": "```python\nbase = 10\nper_pound = 1.2\nweight = 40\ncost = base + per_pound * weight #... | nlprog_det | setting | original | null | deterministic | [] | [] | 118 | {"gold": "58.00", "printed": "58.00", "notation": null} |
nlprog_det-setting-0050514 | <|start|><|user|>
Water costs $20 a month plus $5.10 for each 1,000 gallons over 0,000. What is owed for 22,000 gallons?<|eot|>
<|assistant|>
The bill is $132.20.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Water costs $20 a month plus $5.10 for each 1,000 gallons over 0,000. What is owed for 22,000 gallons?"
},
{
"role": "assistant",
"content": "The bill is $132.20."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 52 | {"gold": "132.20", "printed": "132.20", "notation": null} |
nlprog_det-setting-0050515 | A 10-day notice period begins on March 1, 2019. On what date does it end?
Let the code do the arithmetic:
```python
from datetime import date, timedelta
start = date(2019, 3, 1) # datetime.date(2019, 3, 1)
end = start + timedelta(days=10) # datetime.date(2019, 3, 11)
print(end.isoformat())
```
# console output: 2019... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 143 | {"gold": "2019-03-11", "printed": "2019-03-11", "notation": null} |
nlprog_det-setting-0050516 | How many 1-foot square tiles cover a 11 ft by 4 ft floor (round up)?
Let the code do the arithmetic:
```python
import math
length = 11
width = 4
tile = 1
tiles = math.ceil(length * width / (tile * tile)) # 44
print(tiles)
```
When run, it prints 44.
It takes 44 tiles. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "44", "printed": "44", "notation": null} |
nlprog_det-setting-0050517 | <|start|><|system|>
You are a careful assistant.<|eot|>
<|user|>
Count the days between August 23, 2026 and July 13, 2027.<|eot|>
<|assistant|>
It is 324 days.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a careful assistant."
},
{
"role": "user",
"content": "Count the days between August 23, 2026 and July 13, 2027."
},
{
"role": "assistant",
"content": "It is 324 days."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 44 | {"gold": "324", "printed": "324", "notation": null} |
nlprog_det-setting-0050518 | <|start|><|user|>
Convert 25 °C to Fahrenheit.<|eot|>
<|assistant|>
```python
celsius = 25
fahrenheit = celsius * 9 / 5 + 32 # 77.0
print(round(fahrenheit))
```
(Console output: 77)
That is 77 °F.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert 25 °C to Fahrenheit."
},
{
"role": "assistant",
"content": "```python\ncelsius = 25\nfahrenheit = celsius * 9 / 5 + 32 # 77.0\nprint(round(fahrenheit))\n```\n(Console output: 77)\n\nThat is 77 °F."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "77", "printed": "77", "notation": null} |
nlprog_det-setting-0050519 | <|start|><|user|>
Each storage box holds 25 files. How many boxes are needed for 850 files?<|eot|>
<|assistant|>
```python
import math
files = 850
per_box = 25
boxes = math.ceil(files / per_box)
print(boxes)
```
This prints: 34
It takes 34 boxes.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Each storage box holds 25 files. How many boxes are needed for 850 files?"
},
{
"role": "assistant",
"content": "```python\nimport math\nfiles = 850\nper_box = 25\nboxes = math.ceil(files / per_box)\nprint(boxes)\n```\nThis prints: 34\n\nIt takes 34 boxes."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "34", "printed": "34", "notation": null} |
nlprog_det-setting-0050520 | 6.5 hours of work at $300 an hour: what is the total charge?
The bill is $1,950.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 32 | {"gold": "1950.00", "printed": "1950.00", "notation": null} |
nlprog_det-setting-0050521 | <|start|><|user|>
How long, in days, is it from January 26, 2028 until September 19, 2028?<|eot|>
<|assistant|>
```python
from datetime import date
first = date(2028, 1, 26) # datetime.date(2028, 1, 26)
second = date(2028, 9, 19) # datetime.date(2028, 9, 19)
print((second - first).days)
```
Run output: 237
It is 237... | chat | [
{
"role": "user",
"content": "How long, in days, is it from January 26, 2028 until September 19, 2028?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nfirst = date(2028, 1, 26) # datetime.date(2028, 1, 26)\nsecond = date(2028, 9, 19) # datetime.date(2028, 9, 19)\np... | nlprog_det | setting | original | null | deterministic | [] | [] | 126 | {"gold": "237", "printed": "237", "notation": null} |
nlprog_det-setting-0050522 | <|start|><|user|>
66 volunteers are split into 5 equal teams. How many are on each team, and how many are left over?<|eot|>
<|assistant|>
```python
total = 66
groups = 5
per_group, remainder = divmod(total, groups)
print(f"{per_group} each, {remainder} left over")
```
Python prints 13 each, 1 left over, as expected.
T... | chat | [
{
"role": "user",
"content": "66 volunteers are split into 5 equal teams. How many are on each team, and how many are left over?"
},
{
"role": "assistant",
"content": "```python\ntotal = 66\ngroups = 5\nper_group, remainder = divmod(total, groups)\nprint(f\"{per_group} each, {remainder} left ove... | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "13 each, 1 left over", "printed": "13 each, 1 left over", "notation": null} |
nlprog_det-setting-0050523 | <|start|><|system|>
Be exact with numbers.<|eot|>
<|user|>
Revenue is $22,500 and costs are $20,000. What is the profit margin as a percent of revenue (one decimal)?<|eot|>
<|assistant|>
```python
revenue = 22500
costs = 20000
profit = revenue - costs
margin = profit / revenue * 100
print(round(margin, 1))
```
Printed:... | chat | [
{
"role": "system",
"content": "Be exact with numbers."
},
{
"role": "user",
"content": "Revenue is $22,500 and costs are $20,000. What is the profit margin as a percent of revenue (one decimal)?"
},
{
"role": "assistant",
"content": "```python\nrevenue = 22500\ncosts = 20000\nprofit... | nlprog_det | setting | original | null | deterministic | [] | [] | 114 | {"gold": "11.1", "printed": "11.1", "notation": null} |
nlprog_det-setting-0050524 | Split $861 between Paula and Kofi in the ratio 2 to 5. What is Paula's share?
Program:
```python
total = 861
parts_a = 2
parts_b = 5
share_a = total * parts_a // (parts_a + parts_b) # 246
print(share_a)
```
Output = 246
Paula's share is $246. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 115 | {"gold": "246", "printed": "246", "notation": null} |
nlprog_det-setting-0050525 | <|start|><|system|>
Tools you may use:
[{"name": "math_engine", "description": "Executes a Python program and returns its output.", "parameters": {"type": "object", "properties": {"code": {"type": "string", "description": "Python source code"}}, "required": ["code"]}}]<|eot|>
<|user|>
Scale 300 g of pasta from 8 servin... | chat | [
{
"role": "system",
"content": "Tools you may use:\n[{\"name\": \"math_engine\", \"description\": \"Executes a Python program and returns its output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\": [\"code\"... | nlprog_det | setting | original | null | deterministic | [] | [] | 211 | {"gold": "75", "printed": "75", "notation": null} |
nlprog_det-setting-0050526 | <|start|><|system|>
You help people work with structured data.<|eot|>
<|user|>
Equal monthly payments repay $3,600 plus 10% simple yearly interest over 36 months. How large is a payment?<|eot|>
<|assistant|>
```python
principal = 3600
annual_rate = 10 / 100 # 0.1
months = 36
interest = principal * annual_rate * months... | chat | [
{
"role": "system",
"content": "You help people work with structured data."
},
{
"role": "user",
"content": "Equal monthly payments repay $3,600 plus 10% simple yearly interest over 36 months. How large is a payment?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 3600\... | nlprog_det | setting | original | null | deterministic | [] | [] | 152 | {"gold": "130.00", "printed": "130.00", "notation": null} |
nlprog_det-setting-0050527 | <|start|><|system|>
You are a logic tutor.<|eot|>
<|user|>
Meals are $64 per day and lodging $175 per night. What is the allowance for 5 days and 4 nights?<|eot|>
<|assistant|>
The allowance is $1,020.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a logic tutor."
},
{
"role": "user",
"content": "Meals are $64 per day and lodging $175 per night. What is the allowance for 5 days and 4 nights?"
},
{
"role": "assistant",
"content": "The allowance is $1,020."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 59 | {"gold": "1020", "printed": "1020", "notation": null} |
nlprog_det-setting-0050528 | <|start|><|user|>
With $20,000 in costs and $24,000 in revenue, what percent of revenue is profit? Round to one decimal.<|eot|>
<|assistant|>
```python
revenue = 24000
costs = 20000
profit = revenue - costs # 4000
margin = profit / revenue * 100 # 16.666666666666664
print(round(margin, 1))
```
Shell output — 16.7
Pr... | chat | [
{
"role": "user",
"content": "With $20,000 in costs and $24,000 in revenue, what percent of revenue is profit? Round to one decimal."
},
{
"role": "assistant",
"content": "```python\nrevenue = 24000\ncosts = 20000\nprofit = revenue - costs # 4000\nmargin = profit / revenue * 100 # 16.666666666... | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "16.7", "printed": "16.7", "notation": null} |
nlprog_det-setting-0050529 | A clerk's office charges $50 for each filing. Ivan submits 5 filings. What is the total fee?
A Python solution:
```python
fee = 50
filings = 5
total = fee * filings # 250
print(total)
```
The printout reads 250.
The total fee is $250. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 90 | {"gold": "250", "printed": "250", "notation": null} |
nlprog_det-setting-0050530 | <|start|><|user|>
A library charges $0.10 per book per day late. What is the fine for 2 books that are 9 days late?<|eot|>
<|assistant|>
```python
per_day = 0.1
days_late = 9
books = 2
fine = per_day * days_late * books # 1.8
print(f"{fine:.2f}")
```
It prints 1.80, as expected.
The fine is $1.80.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A library charges $0.10 per book per day late. What is the fine for 2 books that are 9 days late?"
},
{
"role": "assistant",
"content": "```python\nper_day = 0.1\ndays_late = 9\nbooks = 2\nfine = per_day * days_late * books # 1.8\nprint(f\"{fine:.2f}\")\n```\nIt pr... | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "1.80", "printed": "1.80", "notation": null} |
nlprog_det-setting-0050531 | An office budget of $25,000 has expenses of $3,987, $2,020. How much of the budget is left?
The remaining budget is $18,993. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 43 | {"gold": "18993", "printed": "18993", "notation": null} |
nlprog_det-setting-0050532 | <|start|><|user|>
A garage charges $5 an hour, never more than $24 a day. How much for 10 hours?<|eot|>
<|assistant|>
```python
rate = 5
hours = 10
daily_max = 24
cost = min(rate * hours, daily_max) # 24
print(cost)
```
stdout = 24
Parking costs $24.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A garage charges $5 an hour, never more than $24 a day. How much for 10 hours?"
},
{
"role": "assistant",
"content": "```python\nrate = 5\nhours = 10\ndaily_max = 24\ncost = min(rate * hours, daily_max) # 24\nprint(cost)\n```\nstdout = 24\n\nParking costs $24."
}... | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "24", "printed": "24", "notation": null} |
nlprog_det-setting-0050533 | The firm was founded in 2024. How many years had passed by 2060?
In code:
```python
start_year = 2024
end_year = 2060
print(end_year - start_year)
```
The run gives 36, as expected.
That is 36 years. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 75 | {"gold": "36", "printed": "36", "notation": null} |
nlprog_det-setting-0050534 | <|start|><|user|>
An office budget of $20,000 has expenses of $2,629, $3,087, $1,973, $3,498. How much of the budget is left?<|eot|>
<|assistant|>
$8,813 is left.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "An office budget of $20,000 has expenses of $2,629, $3,087, $1,973, $3,498. How much of the budget is left?"
},
{
"role": "assistant",
"content": "$8,813 is left."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 59 | {"gold": "8813", "printed": "8813", "notation": null} |
nlprog_det-setting-0050535 | <|start|><|user|>
A water bill is $12 plus $3.50 per thousand gallons beyond the first 0 thousand. What is the bill for 12 thousand gallons?<|eot|>
<|assistant|>
```python
base = 12
rate = 3.5
used = 12
free = 0
bill = base + rate * max(0, used - free) # 54.0
print(f"{bill:.2f}")
```
Result:
54.00
The bill is $54.00.... | chat | [
{
"role": "user",
"content": "A water bill is $12 plus $3.50 per thousand gallons beyond the first 0 thousand. What is the bill for 12 thousand gallons?"
},
{
"role": "assistant",
"content": "```python\nbase = 12\nrate = 3.5\nused = 12\nfree = 0\nbill = base + rate * max(0, used - free) # 54.0\... | nlprog_det | setting | original | null | deterministic | [] | [] | 120 | {"gold": "54.00", "printed": "54.00", "notation": null} |
nlprog_det-setting-0050536 | Monthly: $29. Annual: $318. What is saved per year by paying annually?
The computation:
```python
monthly = 29
yearly = 318
savings = monthly * 12 - yearly # 30
print(savings)
```
Run it and it prints 30.
The annual plan saves $30. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "30", "printed": "30", "notation": null} |
nlprog_det-setting-0050537 | <|start|><|user|>
Oskar was born on December 21, 2003. How old is Oskar on March 3, 2024?<|eot|>
<|assistant|>
```python
from datetime import date
born = date(2003, 12, 21) # datetime.date(2003, 12, 21)
on = date(2024, 3, 3) # datetime.date(2024, 3, 3)
age = on.year - born.year - ((on.month, on.day) < (born.month, bo... | chat | [
{
"role": "user",
"content": "Oskar was born on December 21, 2003. How old is Oskar on March 3, 2024?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nborn = date(2003, 12, 21) # datetime.date(2003, 12, 21)\non = date(2024, 3, 3) # datetime.date(2024, 3, 3)\nage = o... | nlprog_det | setting | original | null | deterministic | [] | [] | 151 | {"gold": "20", "printed": "20", "notation": null} |
nlprog_det-setting-0050538 | 1 books come back 5 days late, at $0.10 a day each. What is the fine?
We can compute it in Python.
```python
per_day = 0.1
days_late = 5
books = 1
fine = per_day * days_late * books # 0.5
print(f"{fine:.2f}")
```
Running this gives: 0.50
$0.50 is owed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "0.50", "printed": "0.50", "notation": null} |
nlprog_det-setting-0050539 | Convert 24.4 km to meters. That is 24,400 meters. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 21 | {"gold": "24400", "printed": "24400", "notation": null} |
nlprog_det-setting-0050541 | <|start|><|system|>
You are an assistant for a small office.<|eot|>
<|user|>
Pay is $16.00/hour, with overtime at 1.5 times that rate beyond 40 hours. How much for 54 hours?<|eot|>
<|assistant|>
The weekly pay is $976.00.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are an assistant for a small office."
},
{
"role": "user",
"content": "Pay is $16.00/hour, with overtime at 1.5 times that rate beyond 40 hours. How much for 54 hours?"
},
{
"role": "assistant",
"content": "The weekly pay is $976.00."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 66 | {"gold": "976.00", "printed": "976.00", "notation": null} |
nlprog_det-setting-0050542 | <|start|><|system|>
You can call tools. Available tools:
[{"name": "calc", "description": "Executes a Python program and returns its output.", "parameters": {"type": "object", "properties": {"source": {"type": "string", "description": "Python source code"}}, "required": ["source"]}}]<|eot|>
<|user|>
At 40 miles per hou... | chat | [
{
"role": "system",
"content": "You can call tools. Available tools:\n[{\"name\": \"calc\", \"description\": \"Executes a Python program and returns its output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"source\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required... | nlprog_det | setting | original | null | deterministic | [] | [] | 205 | {"gold": "255", "printed": "255", "notation": null} |
nlprog_det-setting-0050543 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
{"name": "sandbox_python", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}<|eot|>
<|user|>
A... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n{\"name\": \"sandbox_python\", \"description\": \"A Python interpreter. Returns standard output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python source co... | nlprog_det | setting | original | null | deterministic | [] | [] | 233 | {"gold": "1395.15", "printed": "1395.15", "notation": null} |
nlprog_det-setting-0050544 | With 14 rows of 10 chairs and 9 empty chairs, how many chairs are taken?
Computing it:
```python
rows = 14
per_row = 10
empty = 9
seated = rows * per_row - empty # 131
print(seated)
```
Out:
131
131 people are seated. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 94 | {"gold": "131", "printed": "131", "notation": null} |
nlprog_det-setting-0050545 | How many units at $25 each (variable cost $17) cover $2,500 of fixed costs?
```python
import math
fixed = 2500
price = 25
variable = 17
units = math.ceil(fixed / (price - variable)) # 313
print(units)
```
It prints 313, as expected.
Break-even is 313 units. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 108 | {"gold": "313", "printed": "313", "notation": null} |
nlprog_det-setting-0050546 | 130 volunteers are split into 4 equal teams. How many are on each team, and how many are left over?
Programmatically:
```python
total = 130
groups = 4
per_group, remainder = divmod(total, groups)
print(f"{per_group} each, {remainder} left over")
```
The code prints 32 each, 2 left over.
32 each, 2 left over. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 109 | {"gold": "32 each, 2 left over", "printed": "32 each, 2 left over", "notation": null} |
nlprog_det-setting-0050547 | Hugo lends $12,000 at 4% simple interest per year for 3 years. How much interest is earned?
The interest is $1,440.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 40 | {"gold": "1440.00", "printed": "1440.00", "notation": null} |
nlprog_det-setting-0050548 | An unpaid balance of $1,000 accrues 1% simple interest per month. How much interest accrues in 5 months?
As Python:
```python
balance = 1000
monthly_rate = 1 / 100 # 0.01
months = 5
interest = balance * monthly_rate * months # 50.0
print(f"{interest:.2f}")
```
Python prints 50.00, as expected.
$50.00 accrues. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 125 | {"gold": "50.00", "printed": "50.00", "notation": null} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.