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-0083310 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
[{"name": "calc", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "object", "properties": {"snippet": {"type": "string", "description": "Python source code"}}, "required": ["snippet"]}}]<|eot|>
<|user|>
Starting ... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n[{\"name\": \"calc\", \"description\": \"A Python interpreter. Returns standard output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"snippet\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \... | nlprog_det | setting | original | null | deterministic | [] | [] | 251 | {"gold": "15904", "printed": "15904", "notation": null} |
nlprog_det-setting-0083311 | <|start|><|user|>
A client paid a $7,500 retainer. The firm has billed 8 hours at $250 per hour. How much of the retainer is left?<|eot|>
<|assistant|>
```python
retainer = 7500
hours = 8
rate = 250
left = retainer - hours * rate # 5500
print(left)
```
The run gives 5500.
$5,500 of the retainer is left.<|eot|>
<|end|... | chat | [
{
"role": "user",
"content": "A client paid a $7,500 retainer. The firm has billed 8 hours at $250 per hour. How much of the retainer is left?"
},
{
"role": "assistant",
"content": "```python\nretainer = 7500\nhours = 8\nrate = 250\nleft = retainer - hours * rate # 5500\nprint(left)\n```\nThe r... | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "5500", "printed": "5500", "notation": null} |
nlprog_det-setting-0083312 | Counting only Monday through Friday, how many business days are there after October 27, 2022 through December 5, 2022?
A Python solution:
```python
from datetime import date, timedelta
start = date(2022, 10, 27)
end = date(2022, 12, 5)
count = 0
for k in range(1, (end - start).days + 1):
if (start + timedelta(days... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 155 | {"gold": "27", "printed": "27", "notation": null} |
nlprog_det-setting-0083313 | <|start|><|user|>
A quorum is 1/3 of the 17 members, rounded up. How many members make a quorum?<|eot|>
<|assistant|>
6 members are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A quorum is 1/3 of the 17 members, rounded up. How many members make a quorum?"
},
{
"role": "assistant",
"content": "6 members are needed."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 38 | {"gold": "6", "printed": "6", "notation": null} |
nlprog_det-setting-0083314 | Parking is $5 per hour with a daily maximum of $24. What do 8 hours cost?
```python
rate = 5
hours = 8
daily_max = 24
cost = min(rate * hours, daily_max) # 24
print(cost)
```
Out:
24
Parking costs $24. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "24", "printed": "24", "notation": null} |
nlprog_det-setting-0083315 | At an exchange rate of 0.92 USD per GBP, how many USD is 5,972 GBP?
Script:
```python
amount = 5972
rate = 0.92
converted = amount * rate # 5494.240000000001
print(f"{converted:.2f}")
```
Python prints 5494.24, as expected.
It converts to 5,494.24 USD. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "5494.24", "printed": "5494.24", "notation": null} |
nlprog_det-setting-0083316 | <|start|><|system|>
Available functions (JSON Schema):
{"name": "python", "description": "Python sandbox for calculations. Returns printed text.", "parameters": {"type": "object", "properties": {"snippet": {"type": "string", "description": "Python source code"}}, "required": ["snippet"]}}<|eot|>
<|user|>
A clerk's offi... | chat | [
{
"role": "system",
"content": "Available functions (JSON Schema):\n{\"name\": \"python\", \"description\": \"Python sandbox for calculations. Returns printed text.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"snippet\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"req... | nlprog_det | setting | original | null | deterministic | [] | [] | 223 | {"gold": "2125", "printed": "2125", "notation": null} |
nlprog_det-setting-0083318 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
[{"name": "python", "description": "Executes a Python program and returns its output.", "parameters": {"type": "object", "properties": {"snippet": {"type": "string", "description": "Python source code"}}, "required": ["snippet"]}}]<|eot|>
<|user|>
A cu... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n[{\"name\": \"python\", \"description\": \"Executes a Python program and returns its output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"snippet\": {\"type\": \"string\", \"description\": \"Python source code\"... | nlprog_det | setting | original | null | deterministic | [] | [] | 278 | {"gold": "21", "printed": "21", "notation": null} |
nlprog_det-setting-0083319 | <|start|><|user|>
Pack A has 8 items for $9.65. Pack B has 24 items for $10.17. Which has the lower price per item?<|eot|>
<|assistant|>
```python
pack_a = 9.65 / 8 # 1.20625
pack_b = 10.17 / 24 # 0.42375
cheaper = "A" if pack_a < pack_b else "B" # 'B'
print(cheaper)
```
Running it prints B.
Pack B is cheaper per i... | chat | [
{
"role": "user",
"content": "Pack A has 8 items for $9.65. Pack B has 24 items for $10.17. Which has the lower price per item?"
},
{
"role": "assistant",
"content": "```python\npack_a = 9.65 / 8 # 1.20625\npack_b = 10.17 / 24 # 0.42375\ncheaper = \"A\" if pack_a < pack_b else \"B\" # 'B'\npr... | nlprog_det | setting | original | null | deterministic | [] | [] | 140 | {"gold": "B", "printed": "B", "notation": null} |
nlprog_det-setting-0083320 | At $20.53 an hour, what does 40 hours of work pay?
```python
rate = 20.53
hours = 40
earnings = rate * hours # 821.2
print(f"{earnings:.2f}")
```
Result:
821.20
The pay is $821.20. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "821.20", "printed": "821.20", "notation": null} |
nlprog_det-setting-0083321 | <|start|><|user|>
Parking is $2 per hour with a daily maximum of $15. What do 3 hours cost?<|eot|>
<|assistant|>
```python
rate = 2
hours = 3
daily_max = 15
cost = min(rate * hours, daily_max) # 6
print(cost)
```
When run, it prints 6, as expected.
Parking costs $6.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Parking is $2 per hour with a daily maximum of $15. What do 3 hours cost?"
},
{
"role": "assistant",
"content": "```python\nrate = 2\nhours = 3\ndaily_max = 15\ncost = min(rate * hours, daily_max) # 6\nprint(cost)\n```\nWhen run, it prints 6, as expected.\n\nParkin... | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "6", "printed": "6", "notation": null} |
nlprog_det-setting-0083322 | <|start|><|user|>
From a $5,000 retainer, 4 hours at $200/hour have been drawn. What remains?<|eot|>
<|assistant|>
retainer = 5000
hours = 4
rate = 200
left = retainer - hours * rate # 4200
print(left)
Output of the run — 4200
The remaining balance is $4,200.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "From a $5,000 retainer, 4 hours at $200/hour have been drawn. What remains?"
},
{
"role": "assistant",
"content": " retainer = 5000\n hours = 4\n rate = 200\n left = retainer - hours * rate # 4200\n print(left)\nOutput of the run — 4200\n\nThe remain... | nlprog_det | setting | original | null | deterministic | [] | [] | 85 | {"gold": "4200", "printed": "4200", "notation": null} |
nlprog_det-setting-0083323 | A $2,400 loan carries 8% simple annual interest over 12 months. Interest and principal are repaid in equal monthly payments. What is each payment?
In Python:
```python
principal = 2400
annual_rate = 8 / 100 # 0.08
months = 12
interest = principal * annual_rate * months / 12 # 192.0
payment = (principal + interest) /... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 147 | {"gold": "216.00", "printed": "216.00", "notation": null} |
nlprog_det-setting-0083324 | With $8,000 in costs and $13,000 in revenue, what percent of revenue is profit? Round to one decimal.
One way, in code:
```python
revenue = 13000
costs = 8000
profit = revenue - costs # 5000
margin = profit / revenue * 100 # 38.46153846153847
print(round(margin, 1))
```
It outputs 38.5.
The margin is 38.5%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "38.5", "printed": "38.5", "notation": null} |
nlprog_det-setting-0083325 | <|start|><|system|>
You are a data assistant.<|eot|>
<|user|>
With 18 rows of 15 chairs and 12 empty chairs, how many chairs are taken?<|eot|>
<|assistant|>
```python
rows = 18
per_row = 15
empty = 12
seated = rows * per_row - empty # 258
print(seated)
```
Printed:
258
258 people are seated.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a data assistant."
},
{
"role": "user",
"content": "With 18 rows of 15 chairs and 12 empty chairs, how many chairs are taken?"
},
{
"role": "assistant",
"content": "```python\nrows = 18\nper_row = 15\nempty = 12\nseated = rows * per_row - empty... | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "258", "printed": "258", "notation": null} |
nlprog_det-setting-0083326 | <|start|><|user|>
What commission does Farah make on $85,615 in sales at 10%?<|eot|>
<|assistant|>
The commission is $8,561.50.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What commission does Farah make on $85,615 in sales at 10%?"
},
{
"role": "assistant",
"content": "The commission is $8,561.50."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 40 | {"gold": "8561.50", "printed": "8561.50", "notation": null} |
nlprog_det-setting-0083327 | Counting the first and last day, how many days are there from April 25, 2027 through May 12, 2027?
In Python:
from datetime import date
first = date(2027, 4, 25) # datetime.date(2027, 4, 25)
last = date(2027, 5, 12) # datetime.date(2027, 5, 12)
days = (last - first).days + 1 # 18
print(days)
# p... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 133 | {"gold": "18", "printed": "18", "notation": null} |
nlprog_det-setting-0083328 | <|start|><|user|>
Convert 1,415 USD to CAD at 1 USD = 1.27 CAD.<|eot|>
<|assistant|>
```python
amount = 1415
rate = 1.27
converted = amount * rate
print(f"{converted:.2f}")
```
# printed result: 1797.05
That is 1,797.05 CAD.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert 1,415 USD to CAD at 1 USD = 1.27 CAD."
},
{
"role": "assistant",
"content": "```python\namount = 1415\nrate = 1.27\nconverted = amount * rate\nprint(f\"{converted:.2f}\")\n```\n# printed result: 1797.05\n\nThat is 1,797.05 CAD."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "1797.05", "printed": "1797.05", "notation": null} |
nlprog_det-setting-0083329 | <|start|><|user|>
After a 25% fee is taken from a $96,000 judgment, 2 plaintiffs share the remainder equally. What is each plaintiff's share?<|eot|>
<|assistant|>
```python
award = 96000
fee = award * 25 / 100 # 24000.0
remaining = award - fee # 72000.0
per_client = remaining / 2 # 36000.0
print(f"{per_client:.2f}")... | chat | [
{
"role": "user",
"content": "After a 25% fee is taken from a $96,000 judgment, 2 plaintiffs share the remainder equally. What is each plaintiff's share?"
},
{
"role": "assistant",
"content": "```python\naward = 96000\nfee = award * 25 / 100 # 24000.0\nremaining = award - fee # 72000.0\nper_cl... | nlprog_det | setting | original | null | deterministic | [] | [] | 139 | {"gold": "36000.00", "printed": "36000.00", "notation": null} |
nlprog_det-setting-0083330 | How many of 58 members form a majority (more than half)?
Let the code do the arithmetic:
members = 58
majority = members // 2 + 1 # 30
print(majority)
(Program output: 30)
30 members are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 63 | {"gold": "30", "printed": "30", "notation": null} |
nlprog_det-setting-0083332 | Express 53 hours in days and hours.
Python:
```python
hours = 53
days, rest = divmod(hours, 24)
print(f"{days} days and {rest} hours")
```
On running, it outputs: 2 days and 5 hours
53 hours is 2 days and 5 hours. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "2 days and 5 hours", "printed": "2 days and 5 hours", "notation": null} |
nlprog_det-setting-0083333 | Split $5,537 between Leon and Tomas in the ratio 3 to 4. What is Leon's share?
A Python solution:
```python
total = 5537
parts_a = 3
parts_b = 4
share_a = total * parts_a // (parts_a + parts_b) # 2373
print(share_a)
```
# printed: 2373
Leon gets $2,373. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 118 | {"gold": "2373", "printed": "2373", "notation": null} |
nlprog_det-setting-0083334 | <|start|><|user|>
Scale 100 g of lentils from 2 servings to 12 servings.<|eot|>
<|assistant|>
grams = 100
serves = 2
needed_for = 12
scaled = grams * needed_for // serves # 600
print(scaled)
It prints 600, as expected.
600 grams of lentils are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Scale 100 g of lentils from 2 servings to 12 servings."
},
{
"role": "assistant",
"content": " grams = 100\n serves = 2\n needed_for = 12\n scaled = grams * needed_for // serves # 600\n print(scaled)\nIt prints 600, as expected.\n\n600 grams of lenti... | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "600", "printed": "600", "notation": null} |
nlprog_det-setting-0083335 | Express 39 hours in days and hours.
```python
hours = 39
days, rest = divmod(hours, 24)
print(f"{days} days and {rest} hours")
```
Executing it gives: 1 days and 15 hours
39 hours is 1 days and 15 hours. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 80 | {"gold": "1 days and 15 hours", "printed": "1 days and 15 hours", "notation": null} |
nlprog_det-setting-0083336 | A lease runs for 12 months at $1,640 per month. How much rent is paid over the whole term?
Translated to Python:
```python
monthly_rent = 1640
months = 12
total = monthly_rent * months # 19680
print(total)
```
(stdout: 19680)
In total, $19,680 is paid. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "19680", "printed": "19680", "notation": null} |
nlprog_det-setting-0083337 | Maren and Abel share $469 in the ratio 2:5. How much does Maren get?
The computation:
```python
total = 469
parts_a = 2
parts_b = 5
share_a = total * parts_a // (parts_a + parts_b) # 134
print(share_a)
```
Execution result — 134
Maren's share is $134. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "134", "printed": "134", "notation": null} |
nlprog_det-setting-0083338 | Convert 3 h 6 min (the length of a meeting) to minutes.
A few lines of Python do it:
```python
hours = 3
minutes = 6
total_minutes = hours * 60 + minutes # 186
print(total_minutes)
```
Output of the run: 186
The meeting lasted 186 minutes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 94 | {"gold": "186", "printed": "186", "notation": null} |
nlprog_det-setting-0083339 | <|start|><|user|>
How many days are there from August 11, 2023 to May 13, 2024?<|eot|>
<|assistant|>
```python
from datetime import date
first = date(2023, 8, 11) # datetime.date(2023, 8, 11)
second = date(2024, 5, 13) # datetime.date(2024, 5, 13)
print((second - first).days)
```
That prints 276.
There are 276 days ... | chat | [
{
"role": "user",
"content": "How many days are there from August 11, 2023 to May 13, 2024?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nfirst = date(2023, 8, 11) # datetime.date(2023, 8, 11)\nsecond = date(2024, 5, 13) # datetime.date(2024, 5, 13)\nprint((secon... | nlprog_det | setting | original | null | deterministic | [] | [] | 124 | {"gold": "276", "printed": "276", "notation": null} |
nlprog_det-setting-0083340 | At $0.67 per mile, what is the reimbursement for 257 miles?
Written as code:
```python
miles = 257
rate = 0.67
reimbursement = miles * rate # 172.19
print(f"{reimbursement:.2f}")
```
It prints 172.19.
The reimbursement is $172.19. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "172.19", "printed": "172.19", "notation": null} |
nlprog_det-setting-0083341 | <|start|><|system|>
Available functions (JSON Schema):
{"name": "compute", "description": "Evaluates Python and returns the printed output.", "parameters": {"type": "object", "properties": {"script": {"type": "string", "description": "Python source code"}}, "required": ["script"]}}<|eot|>
<|user|>
Parking is $3 per hou... | chat | [
{
"role": "system",
"content": "Available functions (JSON Schema):\n{\"name\": \"compute\", \"description\": \"Evaluates Python and returns the printed output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"script\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\... | nlprog_det | setting | original | null | deterministic | [] | [] | 213 | {"gold": "24", "printed": "24", "notation": null} |
nlprog_det-setting-0083342 | A hearing lasted 4 hours and 41 minutes. How many minutes is that?
Programmatically:
hours = 4
minutes = 41
total_minutes = hours * 60 + minutes # 281
print(total_minutes)
# output: 281
That is 281 minutes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 71 | {"gold": "281", "printed": "281", "notation": null} |
nlprog_det-setting-0083343 | <|start|><|user|>
Arjun's scores were 92, 97, 79 and 88. What is the average score?<|eot|>
<|assistant|>
```python
scores = [92, 97, 79, 88]
average = sum(scores) // len(scores) # 89
print(average)
```
It prints 89.
The average score is 89.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Arjun's scores were 92, 97, 79 and 88. What is the average score?"
},
{
"role": "assistant",
"content": "```python\nscores = [92, 97, 79, 88]\naverage = sum(scores) // len(scores) # 89\nprint(average)\n```\nIt prints 89.\n\nThe average score is 89."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "89", "printed": "89", "notation": null} |
nlprog_det-setting-0083344 | Counting only Monday through Friday, how many business days are there after October 23, 2025 through November 30, 2025?
```python
from datetime import date, timedelta
start = date(2025, 10, 23)
end = date(2025, 11, 30)
count = 0
for k in range(1, (end - start).days + 1):
if (start + timedelta(days=k)).weekday() < ... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 151 | {"gold": "26", "printed": "26", "notation": null} |
nlprog_det-setting-0083345 | From a $7,500 retainer, 13 hours at $250/hour have been drawn. What remains?
Python version:
```python
retainer = 7500
hours = 13
rate = 250
left = retainer - hours * rate # 4250
print(left)
```
Run result = 4250
The remaining balance is $4,250. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "4250", "printed": "4250", "notation": null} |
nlprog_det-setting-0083346 | One can of paint covers 400 square feet. How many cans are needed for 1040 square feet of wall?
Computation in Python:
```python
import math
area = 1040
coverage = 400
cans = math.ceil(area / coverage) # 3
print(cans)
```
Interpreter output: 3
3 cans are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "3", "printed": "3", "notation": null} |
nlprog_det-setting-0083347 | <|start|><|user|>
A court charges $15 per request plus $0.25 per page after the first 10 pages. What does a 25-page copy cost?<|eot|>
<|assistant|>
```python
pages = 25
base = 15
per_page = 0.25
free_pages = 10
cost = base + max(0, pages - free_pages) * per_page # 18.75
print(f"{cost:.2f}")
```
The program outputs: 18... | chat | [
{
"role": "user",
"content": "A court charges $15 per request plus $0.25 per page after the first 10 pages. What does a 25-page copy cost?"
},
{
"role": "assistant",
"content": "```python\npages = 25\nbase = 15\nper_page = 0.25\nfree_pages = 10\ncost = base + max(0, pages - free_pages) * per_pag... | nlprog_det | setting | original | null | deterministic | [] | [] | 131 | {"gold": "18.75", "printed": "18.75", "notation": null} |
nlprog_det-setting-0083348 | <|start|><|system|>
Tools (call with JSON):
[{"name": "calc", "description": "Runs a short Python snippet and returns what it prints.", "parameters": {"type": "object", "properties": {"source": {"type": "string", "description": "Python source code"}}, "required": ["source"]}}, {"name": "define_word", "description": "Re... | chat | [
{
"role": "system",
"content": "Tools (call with JSON):\n[{\"name\": \"calc\", \"description\": \"Runs a short Python snippet and returns what it prints.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"source\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\": [\"... | nlprog_det | setting | original | null | deterministic | [] | [] | 288 | {"gold": "2", "printed": "2", "notation": null} |
nlprog_det-setting-0083349 | <|start|><|user|>
Convert 7,495 CHF to USD at 1 CHF = 1.12 USD.<|eot|>
<|assistant|>
```python
amount = 7495
rate = 1.12
converted = amount * rate # 8394.400000000001
print(f"{converted:.2f}")
```
On running, it outputs 8394.40.
That is 8,394.40 USD.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert 7,495 CHF to USD at 1 CHF = 1.12 USD."
},
{
"role": "assistant",
"content": "```python\namount = 7495\nrate = 1.12\nconverted = amount * rate # 8394.400000000001\nprint(f\"{converted:.2f}\")\n```\nOn running, it outputs 8394.40.\n\nThat is 8,394.40 USD."
... | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "8394.40", "printed": "8394.40", "notation": null} |
nlprog_det-setting-0083350 | <|start|><|system|>
Tool definitions:
{"name": "compute", "description": "Python sandbox for calculations. Returns printed text.", "parameters": {"type": "object", "properties": {"code": {"type": "string", "description": "Python source code"}}, "required": ["code"]}}<|eot|>
<|user|>
An office budget of $5,000 has expen... | chat | [
{
"role": "system",
"content": "Tool definitions:\n{\"name\": \"compute\", \"description\": \"Python sandbox for calculations. Returns printed text.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\": [\"code\"]... | nlprog_det | setting | original | null | deterministic | [] | [] | 237 | {"gold": "-5950", "printed": "-5950", "notation": null} |
nlprog_det-setting-0083351 | <|start|><|user|>
A pack of 6 lanyards sells for $54. What does each cost?<|eot|>
<|assistant|>
```python
total = 54
count = 6
per_item = total // count # 9
print(per_item)
```
(Result: 9)
Each one costs $9.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A pack of 6 lanyards sells for $54. What does each cost?"
},
{
"role": "assistant",
"content": "```python\ntotal = 54\ncount = 6\nper_item = total // count # 9\nprint(per_item)\n```\n(Result: 9)\n\nEach one costs $9."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 82 | {"gold": "9", "printed": "9", "notation": null} |
nlprog_det-setting-0083352 | <|start|><|system|>
You help people work with structured data.<|eot|>
<|user|>
Fixed costs are $6,000. Each unit sells for $30 and costs $20 to make. How many units must be sold to break even?<|eot|>
<|assistant|>
```python
import math
fixed = 6000
price = 30
variable = 20
units = math.ceil(fixed / (price - variable)) ... | chat | [
{
"role": "system",
"content": "You help people work with structured data."
},
{
"role": "user",
"content": "Fixed costs are $6,000. Each unit sells for $30 and costs $20 to make. How many units must be sold to break even?"
},
{
"role": "assistant",
"content": "```python\nimport math... | nlprog_det | setting | original | null | deterministic | [] | [] | 125 | {"gold": "600", "printed": "600", "notation": null} |
nlprog_det-setting-0083353 | Divide 262 items among 5 groups as evenly as possible with equal groups. How many per group, and how many remain?
One way, in code:
```python
total = 262
groups = 5
per_group, remainder = divmod(total, groups)
print(f"{per_group} each, {remainder} left over")
```
# program output: 52 each, 2 left over
52 each, 2 left... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 114 | {"gold": "52 each, 2 left over", "printed": "52 each, 2 left over", "notation": null} |
nlprog_det-setting-0083354 | <|start|><|system|>
You are a teaching assistant.<|eot|>
<|user|>
A meeting lasted 3 hours and 36 minutes. How many minutes is that?<|eot|>
<|assistant|>
The meeting lasted 216 minutes.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a teaching assistant."
},
{
"role": "user",
"content": "A meeting lasted 3 hours and 36 minutes. How many minutes is that?"
},
{
"role": "assistant",
"content": "The meeting lasted 216 minutes."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 44 | {"gold": "216", "printed": "216", "notation": null} |
nlprog_det-setting-0083355 | <|start|><|user|>
With $20,000 in costs and $22,500 in revenue, what percent of revenue is profit? Round to one decimal.<|eot|>
<|assistant|>
```python
revenue = 22500
costs = 20000
profit = revenue - costs # 2500
margin = profit / revenue * 100 # 11.11111111111111
print(round(margin, 1))
```
It outputs: 11.1
The ma... | chat | [
{
"role": "user",
"content": "With $20,000 in costs and $22,500 in revenue, what percent of revenue is profit? Round to one decimal."
},
{
"role": "assistant",
"content": "```python\nrevenue = 22500\ncosts = 20000\nprofit = revenue - costs # 2500\nmargin = profit / revenue * 100 # 11.111111111... | nlprog_det | setting | original | null | deterministic | [] | [] | 115 | {"gold": "11.1", "printed": "11.1", "notation": null} |
nlprog_det-setting-0083356 | <|start|><|user|>
One can of paint covers 400 square feet. How many cans are needed for 510 square feet of wall?<|eot|>
<|assistant|>
```python
import math
area = 510
coverage = 400
cans = math.ceil(area / coverage) # 2
print(cans)
```
The program prints: 2
Buy 2 cans.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "One can of paint covers 400 square feet. How many cans are needed for 510 square feet of wall?"
},
{
"role": "assistant",
"content": "```python\nimport math\narea = 510\ncoverage = 400\ncans = math.ceil(area / coverage) # 2\nprint(cans)\n```\nThe program prints: 2\... | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "2", "printed": "2", "notation": null} |
nlprog_det-setting-0083357 | A recipe for 4 people uses 150 grams of pasta. How many grams are needed for 6 people?
Coded up:
```python
grams = 150
serves = 4
needed_for = 6
scaled = grams * needed_for // serves # 225
print(scaled)
```
The code prints 225.
Use 225 g of pasta. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "225", "printed": "225", "notation": null} |
nlprog_det-setting-0083358 | <|start|><|user|>
A 9 × 14 foot patio is tiled with 2 ft × 2 ft tiles. How many tiles, rounded up?<|eot|>
<|assistant|>
```python
import math
length = 9
width = 14
tile = 2
tiles = math.ceil(length * width / (tile * tile)) # 32
print(tiles)
```
The printout reads: 32
32 tiles are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 9 × 14 foot patio is tiled with 2 ft × 2 ft tiles. How many tiles, rounded up?"
},
{
"role": "assistant",
"content": "```python\nimport math\nlength = 9\nwidth = 14\ntile = 2\ntiles = math.ceil(length * width / (tile * tile)) # 32\nprint(tiles)\n```\nThe printout... | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "32", "printed": "32", "notation": null} |
nlprog_det-setting-0083359 | A hall has 24 rows of 17 seats, and 27 seats are empty. How many people are seated?
Translated to Python:
```python
rows = 24
per_row = 17
empty = 27
seated = rows * per_row - empty # 381
print(seated)
```
It prints 381, as expected.
381 people are seated. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 104 | {"gold": "381", "printed": "381", "notation": null} |
nlprog_det-setting-0083360 | <|start|><|system|>
Be brief and correct.<|eot|>
<|user|>
35 tape rolls cost $8 apiece. With 6% tax added, what is the total?<|eot|>
<|assistant|>
```python
quantity = 35
unit_price = 8
subtotal = quantity * unit_price # 280
total = subtotal * (1 + 6 / 100) # 296.8
print(f"{total:.2f}")
```
(Printed result: 296.80)
... | chat | [
{
"role": "system",
"content": "Be brief and correct."
},
{
"role": "user",
"content": "35 tape rolls cost $8 apiece. With 6% tax added, what is the total?"
},
{
"role": "assistant",
"content": "```python\nquantity = 35\nunit_price = 8\nsubtotal = quantity * unit_price # 280\ntotal ... | nlprog_det | setting | original | null | deterministic | [] | [] | 137 | {"gold": "296.80", "printed": "296.80", "notation": null} |
nlprog_det-setting-0083361 | Convert 3,867 EUR to USD at 1 EUR = 1.08 USD.
In Python:
```python
amount = 3867
rate = 1.08
converted = amount * rate # 4176.360000000001
print(f"{converted:.2f}")
```
Output of the run: 4176.36
That is 4,176.36 USD. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "4176.36", "printed": "4176.36", "notation": null} |
nlprog_det-setting-0083362 | Scale 200 g of lentils from 2 servings to 12 servings.
```python
grams = 200
serves = 2
needed_for = 12
scaled = grams * needed_for // serves
print(scaled)
```
(Program output: 1200)
Use 1200 g of lentils. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "1200", "printed": "1200", "notation": null} |
nlprog_det-setting-0083363 | With 25% off, what does a $180 kettle cost?
The Python version:
```python
price = 180
discount = 25 / 100 # 0.25
sale_price = price * (1 - discount) # 135.0
print(f"{sale_price:.2f}")
```
Python prints: 135.00
The sale price is $135.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 115 | {"gold": "135.00", "printed": "135.00", "notation": null} |
nlprog_det-setting-0083364 | <|start|><|system|>
You help paralegals with routine tasks.<|eot|>
<|user|>
178 copies of a 35-page packet are printed at $0.08 per page. What is the cost?<|eot|>
<|assistant|>
```python
pages = 35
copies = 178
cost_per_page = 0.08
cost = pages * copies * cost_per_page # 498.40000000000003
print(f"{cost:.2f}")
```
(Co... | chat | [
{
"role": "system",
"content": "You help paralegals with routine tasks."
},
{
"role": "user",
"content": "178 copies of a 35-page packet are printed at $0.08 per page. What is the cost?"
},
{
"role": "assistant",
"content": "```python\npages = 35\ncopies = 178\ncost_per_page = 0.08\n... | nlprog_det | setting | original | null | deterministic | [] | [] | 142 | {"gold": "498.40", "printed": "498.40", "notation": null} |
nlprog_det-setting-0083365 | 10 boxes hold 6 toner kits each. After 14 are handed out, how many are left?
Coded up:
```python
boxes = 10
per_box = 6
given_away = 14
left = boxes * per_box - given_away
print(left)
```
It outputs 46.
That leaves 46 toner kits. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "46", "printed": "46", "notation": null} |
nlprog_det-setting-0083366 | <|start|><|user|>
The rules require 3/5 of 8 members (round up) to be present. How many is that?<|eot|>
<|assistant|>
```python
import math
members = 8
quorum = math.ceil(members * 3 / 5) # 5
print(quorum)
```
The printout reads 5.
5 members are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "The rules require 3/5 of 8 members (round up) to be present. How many is that?"
},
{
"role": "assistant",
"content": "```python\nimport math\nmembers = 8\nquorum = math.ceil(members * 3 / 5) # 5\nprint(quorum)\n```\nThe printout reads 5.\n\n5 members are needed."
... | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "5", "printed": "5", "notation": null} |
nlprog_det-setting-0083367 | An attorney bills 10.5 hours at $180 per hour. What is the bill?
```python
hours = 10.5
rate = 180
bill = hours * rate # 1890.0
print(f"{bill:.2f}")
```
# stdout: 1890.00
That comes to $1,890.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "1890.00", "printed": "1890.00", "notation": null} |
nlprog_det-setting-0083368 | Of a $5,000 budget, $500 has been spent. What percent is that?
Programmatically:
```python
budget = 5000
spent = 500
percent = spent / budget * 100
print(round(percent, 1))
```
On running, it outputs: 10.0
10.0% has been spent. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 84 | {"gold": "10.0", "printed": "10.0", "notation": null} |
nlprog_det-setting-0083369 | A film lasted 1 hours and 18 minutes. How many minutes is that?
Python makes this quick:
```python
hours = 1
minutes = 18
total_minutes = hours * 60 + minutes # 78
print(total_minutes)
```
Executing it gives: 78
That is 78 minutes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "78", "printed": "78", "notation": null} |
nlprog_det-setting-0083370 | <|start|><|user|>
A lease runs for 18 months at $850 per month. How much rent is paid over the whole term?<|eot|>
<|assistant|>
```python
monthly_rent = 850
months = 18
total = monthly_rent * months # 15300
print(total)
```
Out — 15300
In total, $15,300 is paid.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A lease runs for 18 months at $850 per month. How much rent is paid over the whole term?"
},
{
"role": "assistant",
"content": "```python\nmonthly_rent = 850\nmonths = 18\ntotal = monthly_rent * months # 15300\nprint(total)\n```\nOut — 15300\n\nIn total, $15,300 is... | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "15300", "printed": "15300", "notation": null} |
nlprog_det-setting-0083371 | <|start|><|user|>
How much sales tax is charged on a $242.26 purchase at 6%?<|eot|>
<|assistant|>
```python
price = 242.26
tax_rate = 6 / 100
tax = price * tax_rate
print(f"{tax:.2f}")
```
Console output — 14.54
$14.54 in tax.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "How much sales tax is charged on a $242.26 purchase at 6%?"
},
{
"role": "assistant",
"content": "```python\nprice = 242.26\ntax_rate = 6 / 100\ntax = price * tax_rate\nprint(f\"{tax:.2f}\")\n```\nConsole output — 14.54\n\n$14.54 in tax."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "14.54", "printed": "14.54", "notation": null} |
nlprog_det-setting-0083372 | Parking is $2 per hour with a daily maximum of $24. What do 7 hours cost?
A short script:
```python
rate = 2
hours = 7
daily_max = 24
cost = min(rate * hours, daily_max) # 14
print(cost)
```
The run gives 14, as expected.
Parking costs $14. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "14", "printed": "14", "notation": null} |
nlprog_det-setting-0083373 | A 2% increase is applied to $900 monthly rent. What is the new amount?
```python
rent = 900
increase = 2 / 100 # 0.02
new_rent = rent * (1 + increase) # 918.0
print(f"{new_rent:.2f}")
```
It outputs 918.00.
The new rent is $918.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "918.00", "printed": "918.00", "notation": null} |
nlprog_det-setting-0083374 | <|start|><|user|>
A storeroom has 1526 tape rolls. The office uses 20 a day. How many are left after 8 days?<|eot|>
<|assistant|>
```python
stock = 1526
per_day = 20
days = 8
left = stock - per_day * days # 1366
print(left)
```
(Program output: 1366)
1366 tape rolls are left.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A storeroom has 1526 tape rolls. The office uses 20 a day. How many are left after 8 days?"
},
{
"role": "assistant",
"content": "```python\nstock = 1526\nper_day = 20\ndays = 8\nleft = stock - per_day * days # 1366\nprint(left)\n```\n(Program output: 1366)\n\n1366... | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "1366", "printed": "1366", "notation": null} |
nlprog_det-setting-0083375 | <|start|><|user|>
A recipe for 4 people uses 150 grams of sugar. How many grams are needed for 2 people?<|eot|>
<|assistant|>
grams = 150
serves = 4
needed_for = 2
scaled = grams * needed_for // serves # 75
print(scaled)
The script prints 75.
Use 75 g of sugar.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A recipe for 4 people uses 150 grams of sugar. How many grams are needed for 2 people?"
},
{
"role": "assistant",
"content": " grams = 150\n serves = 4\n needed_for = 2\n scaled = grams * needed_for // serves # 75\n print(scaled)\nThe script prints 7... | nlprog_det | setting | original | null | deterministic | [] | [] | 84 | {"gold": "75", "printed": "75", "notation": null} |
nlprog_det-setting-0083376 | Express 104 hours in days and hours.
Script:
```python
hours = 104
days, rest = divmod(hours, 24)
print(f"{days} days and {rest} hours")
```
Python prints: 4 days and 8 hours
104 hours is 4 days and 8 hours. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "4 days and 8 hours", "printed": "4 days and 8 hours", "notation": null} |
nlprog_det-setting-0083377 | <|start|><|user|>
A 39 lb package ships at $5 base plus $1.50/lb. What is the charge?<|eot|>
<|assistant|>
```python
base = 5
per_pound = 1.5
weight = 39
cost = base + per_pound * weight # 63.5
print(f"{cost:.2f}")
```
Running it prints 63.50.
The charge is $63.50.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 39 lb package ships at $5 base plus $1.50/lb. What is the charge?"
},
{
"role": "assistant",
"content": "```python\nbase = 5\nper_pound = 1.5\nweight = 39\ncost = base + per_pound * weight # 63.5\nprint(f\"{cost:.2f}\")\n```\nRunning it prints 63.50.\n\nThe charg... | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "63.50", "printed": "63.50", "notation": null} |
nlprog_det-setting-0083378 | <|start|><|user|>
Fixed costs are $1,200. Each unit sells for $15 and costs $7 to make. How many units must be sold to break even?<|eot|>
<|assistant|>
Break-even is 150 units.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Fixed costs are $1,200. Each unit sells for $15 and costs $7 to make. How many units must be sold to break even?"
},
{
"role": "assistant",
"content": "Break-even is 150 units."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 50 | {"gold": "150", "printed": "150", "notation": null} |
nlprog_det-setting-0083379 | At a 7% tax rate, what is the tax on $59.91?
A short script:
```python
price = 59.91
tax_rate = 7 / 100 # 0.07
tax = price * tax_rate # 4.1937
print(f"{tax:.2f}")
```
The program prints: 4.19
$4.19 in tax. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 99 | {"gold": "4.19", "printed": "4.19", "notation": null} |
nlprog_det-setting-0083380 | <|start|><|user|>
Meals are $64 per day and lodging $110 per night. What is the allowance for 4 days and 3 nights?<|eot|>
<|assistant|>
```python
days = 4
meal_rate = 64
lodging_rate = 110
nights = days - 1 # 3
total = days * meal_rate + nights * lodging_rate # 586
print(total)
```
When run, it prints 586.
The allow... | chat | [
{
"role": "user",
"content": "Meals are $64 per day and lodging $110 per night. What is the allowance for 4 days and 3 nights?"
},
{
"role": "assistant",
"content": "```python\ndays = 4\nmeal_rate = 64\nlodging_rate = 110\nnights = days - 1 # 3\ntotal = days * meal_rate + nights * lodging_rate ... | nlprog_det | setting | original | null | deterministic | [] | [] | 123 | {"gold": "586", "printed": "586", "notation": null} |
nlprog_det-setting-0083381 | $5,000 is invested at 2% compounded yearly. What is it worth after 4 years?
```python
principal = 5000
rate = 2 / 100 # 0.02
years = 4
value = principal * (1 + rate) ** years # 5412.1608
print(f"{value:.2f}")
```
Console output — 5412.16
It is worth $5,412.16. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 114 | {"gold": "5412.16", "printed": "5412.16", "notation": null} |
nlprog_det-setting-0083382 | <|start|><|user|>
A service costs $25 a month or $270 a year. How much does the yearly plan save over 12 monthly payments?<|eot|>
<|assistant|>
```python
monthly = 25
yearly = 270
savings = monthly * 12 - yearly # 30
print(savings)
```
Result: 30
The annual plan saves $30.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A service costs $25 a month or $270 a year. How much does the yearly plan save over 12 monthly payments?"
},
{
"role": "assistant",
"content": "```python\nmonthly = 25\nyearly = 270\nsavings = monthly * 12 - yearly # 30\nprint(savings)\n```\nResult: 30\n\nThe annua... | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "30", "printed": "30", "notation": null} |
nlprog_det-setting-0083383 | <|start|><|user|>
Pay is $20.00/hour, with overtime at 1.5 times that rate beyond 40 hours. How much for 53 hours?<|eot|>
<|assistant|>
```python
rate = 20.0
hours = 53
regular = 40 * rate # 800.0
overtime = (hours - 40) * rate * 1.5 # 390.0
pay = regular + overtime # 1190.0
print(f"{pay:.2f}")
```
Python prints: 11... | chat | [
{
"role": "user",
"content": "Pay is $20.00/hour, with overtime at 1.5 times that rate beyond 40 hours. How much for 53 hours?"
},
{
"role": "assistant",
"content": "```python\nrate = 20.0\nhours = 53\nregular = 40 * rate # 800.0\novertime = (hours - 40) * rate * 1.5 # 390.0\npay = regular + o... | nlprog_det | setting | original | null | deterministic | [] | [] | 148 | {"gold": "1190.00", "printed": "1190.00", "notation": null} |
nlprog_det-setting-0083384 | A claim accrued on February 27, 2019. The limitations period is 4 years. On what date does it expire?
The program:
```python
from datetime import date
accrued = date(2019, 2, 27) # datetime.date(2019, 2, 27)
years = 4
expires = accrued.replace(year=accrued.year + years) # datetime.date(2023, 2, 27)
print(expires.iso... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 147 | {"gold": "2023-02-27", "printed": "2023-02-27", "notation": null} |
nlprog_det-setting-0083385 | Leon's scores were 82, 62 and 87. What is the average score?
A Python solution:
```python
scores = [82, 62, 87]
average = sum(scores) // len(scores)
print(average)
```
Output:
77
The average score is 77. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "77", "printed": "77", "notation": null} |
nlprog_det-setting-0083386 | <|start|><|system|>
Give the answer first.<|eot|>
<|user|>
Which is cheaper per unit: 6 for $8.78 (A) or 20 for $11.86 (B)?<|eot|>
<|assistant|>
```python
pack_a = 8.78 / 6 # 1.4633333333333332
pack_b = 11.86 / 20 # 0.593
cheaper = "A" if pack_a < pack_b else "B" # 'B'
print(cheaper)
```
The script prints B, as expe... | chat | [
{
"role": "system",
"content": "Give the answer first."
},
{
"role": "user",
"content": "Which is cheaper per unit: 6 for $8.78 (A) or 20 for $11.86 (B)?"
},
{
"role": "assistant",
"content": "```python\npack_a = 8.78 / 6 # 1.4633333333333332\npack_b = 11.86 / 20 # 0.593\ncheaper =... | nlprog_det | setting | original | null | deterministic | [] | [] | 144 | {"gold": "B", "printed": "B", "notation": null} |
nlprog_det-setting-0083388 | <|start|><|user|>
Buying 6 labels at $15 each, 4 envelopes at $27 each, 4 ink cartridges at $11 each, someone hands over $250. What change comes back?<|eot|>
<|assistant|>
$8 comes back.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Buying 6 labels at $15 each, 4 envelopes at $27 each, 4 ink cartridges at $11 each, someone hands over $250. What change comes back?"
},
{
"role": "assistant",
"content": "$8 comes back."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 55 | {"gold": "8", "printed": "8", "notation": null} |
nlprog_det-setting-0083389 | A pack of 4 file boxes sells for $160. What does each cost?
In Python:
```python
total = 160
count = 4
per_item = total // count # 40
print(per_item)
```
This prints 40, as expected.
The unit price is $40. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "40", "printed": "40", "notation": null} |
nlprog_det-setting-0083390 | <|start|><|user|>
From 1992 to 2032, how many years is that?<|eot|>
<|assistant|>
```python
start_year = 1992
end_year = 2032
print(end_year - start_year)
```
# stdout: 40
That is 40 years.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "From 1992 to 2032, how many years is that?"
},
{
"role": "assistant",
"content": "```python\nstart_year = 1992\nend_year = 2032\nprint(end_year - start_year)\n```\n# stdout: 40\n\nThat is 40 years."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 70 | {"gold": "40", "printed": "40", "notation": null} |
nlprog_det-setting-0083391 | A meal costs $56.46. How much is a 20% tip?
Here is a short program for it.
```python
bill = 56.46
tip_rate = 20 / 100 # 0.2
tip = bill * tip_rate # 11.292000000000002
print(f"{tip:.2f}")
```
Executing it gives 11.29.
The tip is $11.29. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 112 | {"gold": "11.29", "printed": "11.29", "notation": null} |
nlprog_det-setting-0083392 | <|start|><|user|>
A client paid a $2,500 retainer. The firm has billed 2 hours at $275 per hour. How much of the retainer is left?<|eot|>
<|assistant|>
```python
retainer = 2500
hours = 2
rate = 275
left = retainer - hours * rate # 1950
print(left)
```
What it prints — 1950
The remaining balance is $1,950.<|eot|>
<|e... | chat | [
{
"role": "user",
"content": "A client paid a $2,500 retainer. The firm has billed 2 hours at $275 per hour. How much of the retainer is left?"
},
{
"role": "assistant",
"content": "```python\nretainer = 2500\nhours = 2\nrate = 275\nleft = retainer - hours * rate # 1950\nprint(left)\n```\nWhat ... | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "1950", "printed": "1950", "notation": null} |
nlprog_det-setting-0083393 | <|start|><|user|>
A claim accrued on June 6, 2018. The limitations period is 5 years. On what date does it expire?<|eot|>
<|assistant|>
```python
from datetime import date
accrued = date(2018, 6, 6)
years = 5
expires = accrued.replace(year=accrued.year + years)
print(expires.isoformat())
```
The run gives 2023-06-06.
... | chat | [
{
"role": "user",
"content": "A claim accrued on June 6, 2018. The limitations period is 5 years. On what date does it expire?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\naccrued = date(2018, 6, 6)\nyears = 5\nexpires = accrued.replace(year=accrued.year + years)\... | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "2023-06-06", "printed": "2023-06-06", "notation": null} |
nlprog_det-setting-0083395 | Copies cost $10 plus $0.25 for each page beyond 20. How much for 29 pages? The copy costs $12.25. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 32 | {"gold": "12.25", "printed": "12.25", "notation": null} |
nlprog_det-setting-0083396 | <|start|><|user|>
What commission does Tobias make on $62,743 in sales at 2%?<|eot|>
<|assistant|>
```python
sales = 62743
rate = 2 / 100 # 0.02
commission = sales * rate # 1254.8600000000001
print(f"{commission:.2f}")
```
The interpreter prints: 1254.86
Tobias earns $1,254.86.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What commission does Tobias make on $62,743 in sales at 2%?"
},
{
"role": "assistant",
"content": "```python\nsales = 62743\nrate = 2 / 100 # 0.02\ncommission = sales * rate # 1254.8600000000001\nprint(f\"{commission:.2f}\")\n```\nThe interpreter prints: 1254.86\n... | nlprog_det | setting | original | null | deterministic | [] | [] | 118 | {"gold": "1254.86", "printed": "1254.86", "notation": null} |
nlprog_det-setting-0083397 | Chen buys 3 boxes of 8 envelopes each and gives away 16 envelopes. How many envelopes are left?
As Python:
boxes = 3
per_box = 8
given_away = 16
left = boxes * per_box - given_away # 8
print(left)
Output:
8
8 envelopes are left. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 94 | {"gold": "8", "printed": "8", "notation": null} |
nlprog_det-setting-0083398 | Femi and Leon share $1,414 in the ratio 3:4. How much does Femi get?
As a program:
```python
total = 1414
parts_a = 3
parts_b = 4
share_a = total * parts_a // (parts_a + parts_b) # 606
print(share_a)
```
What it prints: 606
Femi's share is $606. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 118 | {"gold": "606", "printed": "606", "notation": null} |
nlprog_det-setting-0083400 | A 3% increase is applied to $1,500 monthly rent. What is the new amount?
Python:
```python
rent = 1500
increase = 3 / 100 # 0.03
new_rent = rent * (1 + increase) # 1545.0
print(f"{new_rent:.2f}")
```
Run it and it prints: 1545.00
The new rent is $1,545.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "1545.00", "printed": "1545.00", "notation": null} |
nlprog_det-setting-0083402 | Ines's scores were 71, 66, 100, 80 and 63. What is the average score?
Script:
scores = [71, 66, 100, 80, 63]
average = sum(scores) // len(scores) # 76
print(average)
Running this gives: 76
The mean is 76. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 82 | {"gold": "76", "printed": "76", "notation": null} |
nlprog_det-setting-0083403 | 79 of 80 members attended. What percent attended?
One way, in code:
```python
present = 79
total = 80
percent = present / total * 100 # 98.75
print(round(percent, 1))
```
Run result: 98.8
Attendance was 98.8%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "98.8", "printed": "98.8", "notation": null} |
nlprog_det-setting-0083404 | Copies cost $5 plus $0.25 for each page beyond 0. How much for 49 pages?
In code:
```python
pages = 49
base = 5
per_page = 0.25
free_pages = 0
cost = base + max(0, pages - free_pages) * per_page # 17.25
print(f"{cost:.2f}")
```
stdout = 17.25
The total is $17.25. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "17.25", "printed": "17.25", "notation": null} |
nlprog_det-setting-0083405 | At 2% a month (simple), what interest builds on $1,000 over 4 months?
$80.00 accrues. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 33 | {"gold": "80.00", "printed": "80.00", "notation": null} |
nlprog_det-setting-0083406 | Someone born February 23, 1955 turns how old by June 14, 2020? Give the age in whole years.
Python makes this quick:
```python
from datetime import date
born = date(1955, 2, 23) # datetime.date(1955, 2, 23)
on = date(2020, 6, 14) # datetime.date(2020, 6, 14)
age = on.year - born.year - ((on.month, on.day) < (born.mo... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 161 | {"gold": "65", "printed": "65", "notation": null} |
nlprog_det-setting-0083407 | <|start|><|system|>
You may call the tools below.
[{"name": "calculator", "description": "Executes a Python program and returns its output.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}, {"name": "convert_units", "descrip... | chat | [
{
"role": "system",
"content": "You may call the tools below.\n[{\"name\": \"calculator\", \"description\": \"Executes a Python program and returns its output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required... | nlprog_det | setting | original | null | deterministic | [] | [] | 362 | {"gold": "330.00", "printed": "330.00", "notation": null} |
nlprog_det-setting-0083408 | <|start|><|user|>
Carmen has 14 documents to file, and each filing costs $350. How much are the filing fees in total?<|eot|>
<|assistant|>
```python
fee = 350
filings = 14
total = fee * filings # 4900
print(total)
```
The script prints: 4900
The total fee is $4,900.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Carmen has 14 documents to file, and each filing costs $350. How much are the filing fees in total?"
},
{
"role": "assistant",
"content": "```python\nfee = 350\nfilings = 14\ntotal = fee * filings # 4900\nprint(total)\n```\nThe script prints: 4900\n\nThe total fee ... | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "4900", "printed": "4900", "notation": null} |
nlprog_det-setting-0083409 | What percentage of $2,000 is $1,300?
budget = 2000
spent = 1300
percent = spent / budget * 100 # 65.0
print(round(percent, 1))
Result = 65.0
That is 65.0% of the budget. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 65 | {"gold": "65.0", "printed": "65.0", "notation": null} |
nlprog_det-setting-0083410 | <|start|><|user|>
If a 75-minute appointment begins at 4:00 PM, what time does it finish?<|eot|>
<|assistant|>
```python
start = 16 * 60 + 0
end = start + 75
hour, minute = divmod(end, 60)
print(f"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}")
```
Executing it gives: 5:15 PM
It ends at 5:15 PM.<|eo... | chat | [
{
"role": "user",
"content": "If a 75-minute appointment begins at 4:00 PM, what time does it finish?"
},
{
"role": "assistant",
"content": "```python\nstart = 16 * 60 + 0\nend = start + 75\nhour, minute = divmod(end, 60)\nprint(f\"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}... | nlprog_det | setting | original | null | deterministic | [] | [] | 131 | {"gold": "5:15 PM", "printed": "5:15 PM", "notation": null} |
nlprog_det-setting-0083411 | How many whole days and leftover hours are in 240 hours?
Here is a short program for it.
```python
hours = 240
days, rest = divmod(hours, 24)
print(f"{days} days and {rest} hours")
```
Shell output — 10 days and 0 hours
That is 10 days and 0 hours. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 90 | {"gold": "10 days and 0 hours", "printed": "10 days and 0 hours", "notation": null} |
nlprog_det-setting-0083413 | <|start|><|user|>
Someone born July 7, 1970 turns how old by June 16, 2023? Give the age in whole years.<|eot|>
<|assistant|>
```python
from datetime import date
born = date(1970, 7, 7) # datetime.date(1970, 7, 7)
on = date(2023, 6, 16) # datetime.date(2023, 6, 16)
age = on.year - born.year - ((on.month, on.day) < (b... | chat | [
{
"role": "user",
"content": "Someone born July 7, 1970 turns how old by June 16, 2023? Give the age in whole years."
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nborn = date(1970, 7, 7) # datetime.date(1970, 7, 7)\non = date(2023, 6, 16) # datetime.date(2023, 6,... | nlprog_det | setting | original | null | deterministic | [] | [] | 156 | {"gold": "52", "printed": "52", "notation": null} |
nlprog_det-setting-0083414 | <|start|><|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 # 2500
margin = profit / revenue * 100 # 11.11111111111111
print(round(margin, 1))
```
The script prints: 1... | chat | [
{
"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 = revenue - costs # 2500\nmargin = profit / revenue * 100 # 11.11111... | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "11.1", "printed": "11.1", "notation": null} |
nlprog_det-setting-0083415 | <|start|><|user|>
With 23 rows of 10 chairs and 6 empty chairs, how many chairs are taken?<|eot|>
<|assistant|>
```python
rows = 23
per_row = 10
empty = 6
seated = rows * per_row - empty # 224
print(seated)
```
The script prints 224.
224 people are seated.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "With 23 rows of 10 chairs and 6 empty chairs, how many chairs are taken?"
},
{
"role": "assistant",
"content": "```python\nrows = 23\nper_row = 10\nempty = 6\nseated = rows * per_row - empty # 224\nprint(seated)\n```\nThe script prints 224.\n\n224 people are seated... | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "224", "printed": "224", "notation": null} |
nlprog_det-setting-0083417 | <|start|><|user|>
Convert 20 °C to Fahrenheit.<|eot|>
<|assistant|>
celsius = 20
fahrenheit = celsius * 9 / 5 + 32 # 68.0
print(round(fahrenheit))
Printed: 68
That is 68 °F.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert 20 °C to Fahrenheit."
},
{
"role": "assistant",
"content": " celsius = 20\n fahrenheit = celsius * 9 / 5 + 32 # 68.0\n print(round(fahrenheit))\nPrinted: 68\n\nThat is 68 °F."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 75 | {"gold": "68", "printed": "68", "notation": null} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.